Your IP : 18.117.7.254


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/cnt/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/cnt/dist/cnt.bundle.min.js

this.BX=this.BX||{};(function(e,t,i){"use strict";class s{}s.DANGER="ui-counter-danger";s.WARNING="ui-counter-warning";s.SUCCESS="ui-counter-success";s.PRIMARY="ui-counter-primary";s.GRAY="ui-counter-gray";s.LIGHT="ui-counter-light";s.WHITE="ui-counter-white";s.DARK="ui-counter-dark";s.THEME="ui-counter-theme";class n{}n.SMALL="ui-counter-sm";n.LARGE="ui-counter-lg";n.MEDIUM="ui-counter-md";let o=e=>e,r,a,u;var h=babelHelpers.classPrivateFieldLooseKey("getBorderClassname");class l{constructor(e){Object.defineProperty(this,h,{value:c});this.options=i.Type.isPlainObject(e)?e:{};this.container=null;this.counterContainer=null;this.animate=i.Type.isBoolean(this.options.animate)?this.options.animate:false;this.isDouble=i.Type.isBoolean(this.options.isDouble)?this.options.isDouble:false;this.value=i.Type.isNumber(this.options.value)?this.options.value:0;this.maxValue=i.Type.isNumber(this.options.maxValue)?this.options.maxValue:99;this.size=i.Type.isString(this.options.size)?this.options.size:BX.UI.Counter.Size.MEDIUM;this.color=i.Type.isString(this.options.color)?this.options.color:BX.UI.Counter.Color.PRIMARY;this.secondaryColor=i.Type.isString(this.options.secondaryColor)?this.options.secondaryColor:BX.UI.Counter.Color.PRIMARY;this.border=i.Type.isBoolean(this.options.border)?this.options.border:false}setValue(e){if(i.Type.isNumber(e)){this.value=e<0?0:e}return this}getValue(){if(this.value<=this.maxValue){return this.value}else{return this.maxValue+"+"}}setMaxValue(e){if(i.Type.isNumber(e)){this.value=e<0?0:e}return this}getMaxValue(){return this.maxValue}isBorder(){return this.border}setColor(e){if(i.Type.isStringFilled(e)){if(this.container===null){this.createContainer()}i.Dom.removeClass(this.container,this.color);this.color=e;i.Dom.addClass(this.container,this.color)}return this}setSize(e){if(i.Type.isStringFilled(e)){BX.removeClass(this.container,this.size);this.size=e;BX.addClass(this.container,this.size)}return this}setAnimate(e){if(i.Type.isBoolean(e)){this.animate=e}return this}createSecondaryContainer(){if(this.isDouble){this.secondaryContainer=i.Tag.render(r||(r=o`
				<div class="ui-counter-secondary"></div>
			`))}i.Dom.append(this.secondaryContainer,this.container)}setSecondaryColor(){if(this.secondaryContainer===null){this.createSecondaryContainer()}i.Dom.removeClass(this.secondaryContainer,this.secondaryColor);i.Dom.addClass(this.secondaryContainer,this.secondaryColor)}setBorder(e){if(!i.Type.isBoolean(e)){console.warn('Parameter "border" is not boolean');return this}this.border=e;const t=babelHelpers.classPrivateFieldLooseBase(this,h)[h](e);if(e){i.Dom.addClass(this.container,t)}else{i.Dom.removeClass(this.container,t)}return this}update(e){if(this.container===null){this.createContainer()}if(this.animate==true){this.updateAnimated(e)}else if(this.animate==false){this.setValue(e);i.Dom.adjust(this.counterContainer,{text:this.getValue()})}}updateAnimated(e){if(this.container===null){this.createContainer()}if(e>this.value&&this.value<this.maxValue){i.Dom.addClass(this.counterContainer,"ui-counter-plus")}else if(e<this.value&&this.value<this.maxValue){i.Dom.addClass(this.counterContainer,"ui-counter-minus")}setTimeout(function(){this.setValue(e);i.Dom.adjust(this.counterContainer,{text:this.getValue()})}.bind(this),250);setTimeout(function(){i.Dom.removeClass(this.counterContainer,"ui-counter-plus");i.Dom.removeClass(this.counterContainer,"ui-counter-minus")}.bind(this),500)}show(){if(this.container===null){this.createContainer()}i.Dom.addClass(this.container,"ui-counter-show");i.Dom.removeClass(this.container,"ui-counter-hide")}hide(){if(this.container===null){this.createContainer()}i.Dom.addClass(this.container,"ui-counter-hide");i.Dom.removeClass(this.container,"ui-counter-show")}getCounterContainer(){if(this.counterContainer===null){this.counterContainer=i.Tag.render(a||(a=o`
				<div class="ui-counter-inner">${0}</div>
			`),this.getValue())}return this.counterContainer}createContainer(){if(this.container===null){this.container=i.Tag.render(u||(u=o`
				<div class="ui-counter">${0}</div>
			`),this.getCounterContainer());this.setSize(this.size);this.setColor(this.color);this.setBorder(this.border);this.createSecondaryContainer();this.setSecondaryColor()}return this.container}getContainer(){if(this.container===null){this.createContainer()}return this.container}renderTo(e){if(i.Type.isDomNode(e)){return e.appendChild(this.getContainer())}return null}destroy(){i.Dom.remove(this.container);this.container=null;this.secondaryContainer=null;this.finished=false;this.textAfterContainer=null;this.textBeforeContainer=null;this.bar=null;this.svg=null;for(const e in this){if(this.hasOwnProperty(e)){delete this[e]}}Object.setPrototypeOf(this,null)}}function c(e){if(e){return"ui-counter-border"}else{return""}}l.Color=s;l.Size=n;e.Counter=l;e.CounterColor=s;e.CounterSize=n})(this.BX.UI=this.BX.UI||{},BX,BX);
//# sourceMappingURL=cnt.bundle.map.js