<commit_before>class cola.Carousel extends cola.AbstractItemGroup
	@tagName: "c-carousel"
	@CLASS_NAME: "carousel"
	
	@attributes:
		bind:
			readonlyAfterCreate: true
			setter: (bindStr) -> @_bindSetter(bindStr)
		orientation:
			defaultValue: "horizontal"
			enum: ["horizontal", "vertical"]
		controls:
			defaultValue: true
		pause:
			defaultValue: 3000
	
	@events:
		change: null
	
	getContentContainer: ()->
		@_createItemsWrap(dom) unless @_doms.wrap
		return @_doms.wrap
	
	_parseDom: (dom)->
		parseItem = (node)=>
			childNode = node.firstChild
			while childNode
				if childNode.nodeType == 1
					@_items = [] unless @_items
					@addItem(childNode)
				childNode = childNode.nextSibling
			return
		
		doms = @_doms
		child = dom.firstChild
		while child
			if child.nodeType == 1
				if cola.util.hasClass(child, "items-wrap")
					doms.wrap = child
					parseItem(child)
				else if !doms.indicators and cola.util.hasClass(child, "indicators")
					doms.indicators = child
				else if child.nodeName == "TEMPLATE"
					@_regTemplate(child)
			child = child.nextSibling
		
		@_createIndicatorContainer(dom) unless doms.indicators
		@_createItemsWrap(dom) unless doms.wrap<commit_msg>修复carousel 小bug<commit_after>class cola.Carousel extends cola.AbstractItemGroup
	@tagName: "c-carousel"
	@CLASS_NAME: "carousel"
	
	@attributes:
		bind:
			readonlyAfterCreate: true
			setter: (bindStr) -> @_bindSetter(bindStr)
		orientation:
			defaultValue: "horizontal"
			enum: ["horizontal", "vertical"]
		controls:
			defaultValue: true
		pause:
			defaultValue: 3000
	
	@events:
		change: null
	
	getContentContainer: ()->
		@_createItemsWrap(@_dom) unless @_doms.wrap
		return @_doms.wrap
	
	_parseDom: (dom)->
		parseItem = (node)=>
			childNode = node.firstChild
			while childNode
				if childNode.nodeType == 1
					@_items = [] unless @_items
					@addItem(childNode)
				childNode = childNode.nextSibling
			return
		
		doms = @_doms
		child = dom.firstChild
		while child
			if child.nodeType == 1
				if cola.util.hasClass(child, "items-wrap")
					doms.wrap = child
					parseItem(child)
				else if !doms.indicators and cola.util.hasClass(child, "indicators")
					doms.indicators = child
				else if child.nodeName == "TEMPLATE"
					@_regTemplate(child)
			child = child.nextSibling
		
		@_createIndicatorContainer(dom) unless doms.indicators
		@_createItemsWrap(dom) unless doms.wrap
{'fraction_non_alphanumeric': 0.10856905158069884, 'fraction_numerical': 0.004991680532445923, 'mean_word_length': 3.642857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5548236', 'n_tokens_mistral': 1010, 'n_tokens_neox': 807, 'n_words': 180}