-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsmart.tank.js
167 lines (126 loc) · 287 KB
/
smart.tank.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/* Smart UI v15.0.0 (2023-Jan)
Copyright (c) 2011-2023 jQWidgets.
License: https://htmlelements.com/license/ */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 2612:
/***/ (() => {
Smart("smart-button",class extends Smart.ContentElement{static get properties(){return{value:{type:"string"},name:{type:"string"},type:{value:"button",type:"string"},clickMode:{allowedValues:["hover","press","release","pressAndRelease"],type:"string",value:"release"}}}static get styleUrls(){return["smart.button.css"]}template(){return"<button class=\"smart-button smart-unselectable\" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role=\"presentation\"></button>"}refresh(){}static get listeners(){return{"button.down":"_downHandler","button.mouseenter":"_mouseEnterHandler","button.mouseleave":"_mouseLeaveHandler","button.touchend":"_touchEndHandler","button.click":"_clickHandler","button.up":"_upHandler",up:"_upHandler","button.focus":"_focusHandler","button.blur":"_blurHandler"}}focus(){const e=this;e.$.button?e.$.button.focus():HTMLElement.prototype.focus.call(e)}blur(){const e=this;e.$.button?e.$.button.blur():HTMLElement.prototype.blur.call(e)}_upHandler(e){const t=this;if(e.stopPropagation(),t.$.setAttributeValue("active",!1),t.dataset.target){const n=document.querySelector(t.dataset.target);let a=t.dataset.toggle;const r="smart-window".toLowerCase();if(n&&n.nodeName.toLowerCase()===r&&"modal"===a&&(a="openModal"),"tab"===a||"pill"===a||"list"===a){const e=this.closest(".nav, .list-group"),a='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',r=!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?e.children(".active"):e.querySelectorAll("li > .active");if(e){const n=e.querySelectorAll(a);for(let e=0;e<n.length;e++)n[e].classList.remove("primary");for(let e=0;e<r.length;e++)r[e].classList.remove("active");let i=t.parentNode;for(;i;){if("LI"===i.nodeName){i.classList.add("active");break}i=i.parentNode}t.classList.add("primary")}return n.parentNode.querySelectorAll(".active").forEach((e=>{e.classList.remove("active"),e.classList.add("smart-hidden")})),n.classList.add("active"),void n.classList.remove("smart-hidden")}a&&n&&!n[a]&&"collapse"===a&&(setTimeout((()=>{n.classList.contains("smart-hidden")?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden")})),e.originalEvent.preventDefault()),a&&n&&!n[a]&&"dropdown"===a?(setTimeout((()=>{n.opened=!n.opened})),e.originalEvent.preventDefault()):a&&n&&n[a]&&(setTimeout((()=>{n[a]()}),50),e.originalEvent.preventDefault())}}_focusHandler(){this.$.setAttributeValue("focus",!0),this.$.fireEvent("focus")}_blurHandler(){this.$.setAttributeValue("focus",!1),this.$.fireEvent("blur")}_clickHandler(e){const t=this;("release"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly)&&(e.preventDefault(),e.stopPropagation())}_downHandler(e){const t=this;if(!(t.disabled||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t.$.setAttributeValue("active",!0),"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly))){if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_mouseEnterHandler(e){const t=this;if(!t.readonly&&(t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0),"hover"===t.clickMode)){const n="buttons"in e?e.buttons:e.which;if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_touchEndHandler(){const e=this;setTimeout((function(){e.$button.setAttributeValue("hover",!1),e.$.setAttributeValue("hover",!1)}),300)}_mouseLeaveHandler(){this.$button.setAttributeValue("hover",!1),this.$.setAttributeValue("hover",!1)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;"disabled"===e?(a._setFocusable(),a.$button&&a.$button.setAttributeValue("hover",!1),a.$.setAttributeValue("hover",!1),a instanceof Smart.RepeatButton&&a._stopRepeat()):"unfocusable"===e&&a._setFocusable()}_setFocusable(){const e=this,t=e.$.button?e.$.button:e;if(e.disabled||e.unfocusable)return t.removeAttribute("tabindex"),void(t.tabIndex=-1);t.tabIndex=e.tabIndex>0?e.tabIndex:0}ready(){const e=this;super.ready(),e.setAttribute("role","button"),e._setFocusable(),e.enableShadowDOM&&e.$.hiddenInput&&e.appendChild(e.$.hiddenInput)}}),Smart("smart-repeat-button",class extends Smart.Button{static get properties(){return{delay:{value:50,type:"number"},initialDelay:{value:150,type:"number"}}}static get listeners(){return{"button.down":"_startRepeat","button.mouseenter":"_overriddenHandler","button.mouseleave":"_overriddenHandler","button.pointerenter":"_updateInBoundsFlag","button.pointerleave":"_updateInBoundsFlag","button.touchmove":"_touchmoveHandler","document.up":"_stopRepeat"}}_clickHandler(e){const t=this;("release"!==t.clickMode||t.preventDefaultClick||t.readonly||t.disabled)&&(e.preventDefault(),e.stopPropagation(),t.preventDefaultClick=!1)}_updateInBoundsFlag(e){const t=this;-1!==e.type.indexOf("leave")?(t._isPointerInBounds=!1,t.$button.setAttributeValue("hover",!1),t.$.setAttributeValue("hover",!1)):(t._isPointerInBounds=!0,t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0)),1!==("buttons"in e?e.buttons:e.which)&&t._stopRepeat(e)}_startRepeat(e){const t=this;t.setAttribute("active",""),t._initialTimer||t.readonly||(t._initialTimer=setTimeout((function(){t._repeatTimer=setInterval((()=>{if(t._isPointerInBounds){if(t.hasAttribute("smart-blazor"))return t.$.dispatchEvent(new Event("click")),void(t.preventDefaultClick=!0);const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),t.preventDefaultClick=!0}}),t.delay)}),t.initialDelay))}_stopRepeat(e){const t=this;t.readonly||e&&("pointercancel"===e.type||e.originalEvent&&"pointercancel"===e.originalEvent.type)||(t.$.setAttributeValue("active",!1),t._repeatTimer&&(clearInterval(t._repeatTimer),t._repeatTimer=null),t._initialTimer&&(clearTimeout(t._initialTimer),t._initialTimer=null))}_touchmoveHandler(e){this.preventDefaultClick&&e.cancelable&&(e.preventDefault(),e.stopPropagation())}_overriddenHandler(){}}),Smart("smart-toggle-button",class extends Smart.Button{static get properties(){return{checked:{value:!1,type:"boolean?"},falseContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminate:{value:!1,type:"boolean"},trueContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateTemplate:{value:null,type:"any"},trueTemplate:{value:null,type:"any"},falseTemplate:{value:null,type:"any"},type:{value:"toggle",type:"string",defaultReflectToAttribute:!0,readonly:!0}}}static get listeners(){return{keydown:"_keyHandler",keyup:"_keyHandler",dragstart:"_dragStartHandler","button.click":"_buttonClickHandler","button.mouseenter":"_buttonMouseEnterHandler","button.mouseleave":"_buttonMouseLeaveHandler","document.up":"_documentUpHandler"}}ready(){super.ready(),this._setAriaState(),this._updateGroupValue()}_setAriaState(){const e=this,t=e.checked;null!==t?e.setAttribute("aria-pressed",t):e.setAttribute("aria-pressed","mixed")}_buttonClickHandler(){}_buttonMouseLeaveHandler(){this.removeAttribute("hover")}_buttonMouseEnterHandler(){const e=this;e.setAttribute("hover",""),e.disabled||e.readonly||"hover"!==e.clickMode||(e._changeCheckState("pointer"),e.focus(),e._updateHidenInputNameAndValue())}_documentUpHandler(e){const t=this;t._pressed&&(t._pressed=!1,t.disabled||t.readonly||"press"===t.clickMode||"pointercancel"===e.originalEvent.type||(t._changeCheckState("pointer"),t.focus(),t._updateHidenInputNameAndValue()))}_downHandler(e){const t=this;t.disabled||t.readonly||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t._pressed=!0,"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||(t._changeCheckState("pointer"),t.hasAttribute("smart-blazor")?t.$.dispatchEvent(new Event("click")):t.$.fireEvent("click"),t._updateHidenInputNameAndValue()),"press"===t.clickMode&&(e.preventDefault(),e.stopPropagation()))}_dragStartHandler(e){e.preventDefault()}_keyHandler(e){const t=this;if(!0!==t.disabled&&!t.readonly&&32===e.keyCode){if("keydown"===e.type)return void e.preventDefault();if("none"===t.switchMode)return;t._changeCheckState("keyboard"),t._updateHidenInputNameAndValue()}}_updateGroupValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const n=document.querySelectorAll('[data-target="'+e.dataset.target+'"]'),a=[];if(e.checked){const n=e.dataset.property,a=e.dataset.value;if(n&&void 0!==t[n]){let e=a;"true"===e&&(e=!0),"false"===e&&(e=!1),t[n]=e}}for(let t=0;t<n.length;t++){const r=n[t];r.checked&&(r.name?(a.push(r.name),e.id&&r.setAttribute("data-id",e.id)):e.id&&a.push(e.id))}t.value=a.toString(),e._targetDispatchTimer&&clearTimeout(e._targetDispatchTimer),e._targetDispatchTimer=setTimeout((()=>{t.dispatchEvent(new Event("change"))}),100)}}}_changeCheckState(e){const t=this;let n=null;null===t.checked?t.checked=!0:(n=t.checked,t.checked=!t.checked),t._handleTextSelection(),t.$.fireEvent("change",{value:t.checked,oldValue:n,changeType:e}),t.checked?t.$.fireEvent("checkValue",{changeType:e}):t.$.fireEvent("uncheckValue",{changeType:e}),t._updateGroupValue(),t._setAriaState()}_handleTextSelection(){const e=this;e.$.addClass("smart-unselectable"),e.timer&&clearTimeout(e.timer),e.timer=setTimeout((()=>e.$.removeClass("smart-unselectable")),500)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;if("checked"===e)return a.$.fireEvent("change",{value:n,oldValue:t,changeType:"api"}),void a._setAriaState();switch(e){case"trueTemplate":a._handleTemplate(!0);break;case"falseTemplate":a._handleTemplate(!1);break;case"indeterminateTemplate":a._handleTemplate()}}_htmlBindOnInitialization(){const e=this;e._bindContentProperty("trueContent","smart-true-content"),e._bindContentProperty("falseContent","smart-false-content"),e._bindContentProperty("indeterminateContent","smart-indeterminate-content")}_bindContentProperty(e,t){const n=this;if(!n.$[e+"Container"])return;let a=document.createElement("div");a.innerHTML=n.innerHTML;let r,i=a.getElementsByClassName(t);if(i.length>0)for(let e=0;e<i.length;e++)r=i[e];""===n[e]&&(n[e]=void 0===r?"":r.outerHTML),n.$[e+"Container"].innerHTML=n[e]}_updateContentProperties(){const e=this;function t(t){e.$[t+"Container"]&&(e[t]=e.$[t+"Container"].innerHTML)}t("trueContent"),t("falseContent"),t("indeterminateContent")}_updateHidenInputValue(){const e=this;if(!e.$.hiddenInput)return;let t;t=null===e.checked?"null":!1===e.checked?"off":e.value||"on",e.$.hiddenInput.setAttribute("value",t)}_updateHidenInputName(){const e=this;if(!e.$.hiddenInput)return;let t=!1===e.checked?"":e.name||"";e.$.hiddenInput.setAttribute("name",t)}_updateHidenInputNameAndValue(){this._updateHidenInputName(),this._updateHidenInputValue()}_handleTemplate(e,t){const n=this;let a,r,i;if(!0===e?(a=n.trueTemplate,r=n.$.trueContentContainer,i=n.trueContent):!1===e?(a=n.falseTemplate,r=n.$.falseContentContainer,i=n.falseContent):(a=n.indeterminateTemplate,r=n.$.indeterminateContentContainer,i=n.indeterminateContent),t&&(r.innerHTML=i||""),null===a||!a)return;if("function"==typeof a)return void a(r,{value:i});if(!("content"in document.createElement("template")))return void n.error(n.localize("htmlTemplateNotSuported",{elementType:n.nodeName.toLowerCase()}));if(a=document.getElementById(a),null===a||!("content"in a))return void n.error(n.localize("invalidTemplate",{elementType:n.nodeName.toLowerCase(),property:"template"}));const o=a.content,l=o.childNodes.length,s=/{{\w+}}/g;let u,d=[];for(let e=0;e<l;e++)for(u=s.exec(o.childNodes[e].innerHTML);u;)d.push({childNodeIndex:e,bindingString:u[0]}),u=s.exec(o.childNodes[e].innerHTML);const c=d.length;let p,h,m=document.importNode(a.content,!0);for(let e=0;e<c;e++){p=m.childNodes[d[e].childNodeIndex],h=d.length;for(let t=0;t<h;t++)p.innerHTML=p.innerHTML.replace(d[e].bindingString,i)}r.innerHTML="";for(let e=0;e<m.childNodes.length;e++)m.childNodes[e].outerHTML&&(r.innerHTML+=m.childNodes[e].outerHTML)}});
/***/ }),
/***/ 2052:
/***/ (() => {
(()=>{const e=-1*(new Date).getTimezoneOffset(),t=[{id:"Local",offset:e,offsetHours:e/60,displayName:"",supportsDaylightSavingTime:!1},{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:!1},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:!1},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:!1},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:!1},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:!0},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:!1},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:!1},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:!0},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:!1},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:!0},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:!1},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:!0},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:!0},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:!0},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:!0},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",supportsDaylightSavingTime:!1},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:!0},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:!1},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:!0},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:!0},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:!0},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:!0},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:!0},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:!1},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:!0},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:!0},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:!1},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:!0},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:!1},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:!0},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:!1},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:!0},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:!0},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:!1},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",supportsDaylightSavingTime:!0},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",supportsDaylightSavingTime:!0},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:!0},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",supportsDaylightSavingTime:!0},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:!1},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:!0},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:!0},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:!0},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:!0},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:!0},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:!0},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:!0},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:!0},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:!0},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:!1},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:!1},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:!0},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:!0},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:!0},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:!0},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:!1},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:!0},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:!1},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:!0},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:!0},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:!1},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:!0},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:!1},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:!1},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:!1},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:!1},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:!1},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:!0},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:!0},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:!1},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:!1},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:!0},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:!1},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",supportsDaylightSavingTime:!1},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:!1},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:!0},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:!1},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:!0},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:!1},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:!0},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:!1},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:!1},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:!0},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:!1},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:!0},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:!1},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:!0},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:!0},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:!0},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:!1},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:!0},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:!0},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:!0},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:!0},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:!1},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:!1},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:!0}],a=[0,31,59,90,120,151,181,212,243,273,304,334,365],s=[0,31,60,91,121,152,182,213,244,274,305,335,366];Smart.Utilities.Assign("TimeSpan",class{constructor(){const e=this;if(e.ticksPerMillisecond=1e4,e.millisecondsPerTick=1e-4,e.ticksPerSecond=1e7,e.secondsPerTick=1e-7,e.ticksPerMinute=6e8,e.minutesPerTick=1/6e8,e.ticksPerHour=36e9,e.hoursPerTick=1/36e9,e.ticksPerDay=864e9,e.daysPerTick=1/864e9,e.millisPerSecond=1e3,e.millisPerMinute=6e4,e.millisPerHour=36e5,e.millisPerDay=864e5,e._ticks=0,1===arguments.length){if(isNaN(arguments[0]))throw new Error("Argument must be a number.");e._ticks=arguments[0]}else if(3===arguments.length)e._ticks=e.timeToMS(arguments[0],arguments[1],arguments[2],0);else if(4===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+0;e._ticks=t*e.ticksPerMillisecond}else if(5===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+arguments[4];e._ticks=t*e.ticksPerMillisecond}}ticks(){return this._ticks}days(){return parseInt(this._ticks/this.ticksPerDay)}timeToMS(e,t,a,s){return parseInt((3600*e+60*t+a+s/1e3)*this.ticksPerSecond)}hours(){return parseInt(this._ticks/this.ticksPerHour)%24}milliseconds(){return parseInt(this._ticks/this.ticksPerMillisecond)%1e3}minutes(){return parseInt(this._ticks/this.ticksPerMinute)%60}seconds(){return parseInt(this._ticks/this.ticksPerSecond)%60}totalDays(){return parseInt(this._ticks*this.daysPerTick)}totalHours(){return parseInt(this._ticks*this.hoursPerTick)}totalMilliseconds(){const e=this._ticks*this.millisecondsPerTick;return parseInt(e)}totalMinutes(){return parseInt(this._ticks*this.minutesPerTick)}totalSeconds(){return parseInt(this._ticks*this.secondsPerTick)}add(e){const t=this._ticks+e._ticks;return new Smart.Utilities.TimeSpan(t)}subtract(e){const t=this._ticks-e._ticks;return new Smart.Utilities.TimeSpan(t)}duration(){const e=this;return e._ticks>=0?new Smart.Utilities.TimeSpan(e._ticks):new Smart.Utilities.TimeSpan(-e._ticks)}equals(e){return this._ticks===e._ticks}valueOf(){return this._ticks}compare(e,t){return e._ticks>t._ticks?1:e._ticks<t._ticks?-1:0}interval(e,t){const a=e*t+(e>=0?.5:-.5);return new Smart.Utilities.TimeSpan(a*this.ticksPerMillisecond)}fromDays(e){return this.interval(e,this.millisPerDay)}fromHours(e){return this.interval(e,this.millisPerHour)}fromMilliseconds(e){return this.interval(e,1)}fromMinutes(e){return this.interval(e,this.millisPerMinute)}fromSeconds(e){return this.interval(e,this.millisPerSecond)}fromTicks(e){return new Smart.Utilities.TimeSpan(e)}toString(){return this.totalMilliseconds().toString()}negate(){return new Smart.Utilities.TimeSpan(-this._ticks)}}),Smart.Utilities.Assign("DateTime",class{constructor(){function e(e){const t=i.regexISOString.exec(e);r=new Smart.Utilities.DateTime(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]),parseFloat(t[4]),parseFloat(t[5]),parseFloat(t[6]),parseFloat(t[7]),0,0,0,0,0,0,0,"UTC")}const i=this;let r;if(i.ticksPerMillisecond=1e4,i.millisecondsPerTick=1e-4,i.ticksPerSecond=1e7,i.secondsPerTick=1e-7,i.ticksPerMinute=6e8,i.minutesPerTick=1/6e8,i.ticksPerHour=36e9,i.hoursPerTick=1/36e9,i.ticksPerDay=864e9,i.daysPerTick=1/864e9,i.millisPerSecond=1e3,i.millisPerMinute=6e4,i.millisPerHour=36e5,i.millisPerDay=864e5,i.daysPerYear=365,i.daysPer4Years=1461,i.daysPer100Years=36524,i.daysPer400Years=146097,i.daysTo1601=584388,i.daysTo1899=693593,i.daysTo10000=3652059,i.minTicks=0,i.maxTicks=3155378976e9,i.maxMillis=3155378976e5,i.datePartYear=0,i.datePartDayOfYear=1,i.datePartMonth=2,i.datePartDay=3,i.daysToMonth365=a,i.daysToMonth366=s,i.minValue=new Date(0),i.maxValue=new Date(3155378976e9),i.ticksMask=0x4000000000000000,i.flagsMask=0xc000000000000000,i.localMask=0x8000000000000000,i.ticksCeiling=0x4000000000000000,i.kindUnspecified=0,i.kindUtc=0x4000000000000000,i.kindLocal=0x8000000000000000,i.kindLocalAmbiguousDst=0xc000000000000000,i.kindShift=62,i.regexTrim=/^\s+|\s+$/g,i.regexInfinity=/^[+-]?infinity$/i,i.regexHex=/^0x[a-f0-9]+$/i,i.regexParseFloat=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,i.regexISOString=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/,i.calendar={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",FP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",FPA:"yyyy/MM/dd HH:mm:ss:fffuunnppeeaaxxoo",FPA2:"yyyy-MM-dd HH:mm:ss:fffuunnppeeaaxxoo",FT:"HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",PP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp",PT:"HH:mm:ss:fff:uu:nn:pp"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","},i.dateData=0,i.timeZone=null,i.timeZones=t,i._codeToUnit={u:"_microsecond",uu:"_microsecond",n:"_nanosecond",nn:"_nanosecond",p:"_picosecond",pp:"_picosecond",e:"_femtosecond",ee:"_femtosecond",a:"_attosecond",aa:"_attosecond",x:"_zeptosecond",xx:"_zeptosecond",o:"_yoctosecond",oo:"_yoctosecond"},i._smallUnits=["_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"],i._microsecond=0,i._nanosecond=0,i._picosecond=0,i._femtosecond=0,i._attosecond=0,i._zeptosecond=0,i._yoctosecond=0,0===arguments.length){const e=new Date;i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else if(1===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}}else if(2===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}i.validateTimeZone(arguments[1])}else if(arguments.length>2)if("string"==typeof arguments[0]){const e=i.tryparseDate(arguments[0],arguments[2],arguments[1]);i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{const e=arguments[0],t=arguments[7]||0,a=arguments[8]||0,s=arguments[9]||0,r=arguments[10]||0,n=arguments[11]||0,o=arguments[12]||0,d=arguments[13]||0,l=new Date(e,arguments[1]-1,arguments[2],arguments[3]||0,arguments[4]||0,arguments[5]||0,arguments[6]||0);e<1970&&l.setFullYear(e),i.dateData=i.dateToMS(l.getFullYear(),l.getMonth()+1,l.getDate())+i.timeToMS(l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),i._microsecond=t,i._nanosecond=a,i._picosecond=s,i._femtosecond=r,i._attosecond=n,i._zeptosecond=o,i._yoctosecond=d,arguments[14]&&i.validateTimeZone(arguments[14])}if(i.timeZone||i.validateTimeZone("Local"),r){const e=r.toTimeZone(i.timeZone);i.dateData=e.dateData}}static isValidDate(e){const t=this.validateDate(e);return!(!t||t&&!t.dateData)}static validateDate(e,t,a){if(e instanceof Smart.Utilities.DateTime)return e;if(e instanceof Date)return new Smart.Utilities.DateTime(e);try{if("string"==typeof e&&a)return this.parseDateString(e,t,a);if(new RegExp(/^\d{1,2}\/\d{1,2}\/\d{4}(, \d{1,2}:\d{2}:\d{1,2} [A|P]M)?$/).test(e)){const t=new Date(e);if(!isNaN(t.getTime()))return new Smart.Utilities.DateTime(t)}if("string"==typeof e)return this.parseDateString(e,t,a);if("number"==typeof e)return new Smart.Utilities.DateTime(new Date(e))}catch(e){}return t}static parseDateString(e,t,a){const s=new Date(e);if(!isNaN(s.getTime()))return e&&"string"==typeof e&&a?new Smart.Utilities.DateTime(e,a,null):new Smart.Utilities.DateTime(s);const i=e.indexOf("Date("),r=e.indexOf("DateTime("),n=e.lastIndexOf(")");let o=e;if(-1===i&&-1===r||-1===n){const t=new Smart.Utilities.DateTime,s=t.parseDate(e,a);if(s)return o=new Smart.Utilities.DateTime(s),t.copySmallTimePartValues(o),o}else{if(o=-1!==i?e.slice(i+5,n):e.slice(r+9,n),o=o.replace(/'/g,"").replace(/"/g,"").replace(/^\s+|\s+$|\s+(?=\s)/g,""),""===o.trim())return new Smart.Utilities.DateTime;if(new RegExp(/(^(\d+)(\s*,\s*\d+)+(\s*,\s*[a-zA-Z ]+)?$)/g).test(o))return o=o.split(","),o.map((function(e,t){isNaN(o[t])?o[t]=e.trim():o[t]=parseInt(e)})),-1!==i&&o[1]++,o.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,o)),o}if(""===o.trim())return t;if(!isNaN(o))return o=new Date(parseInt(o,10)),new Smart.Utilities.DateTime(o);try{const e=o.split(",");2===e.length?(e[1]=e[1].trim(),e.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,e))):o=new Smart.Utilities.DateTime(o)}catch(e){o=t}return o}static fromFullTimeStamp(e){e=e.toString();const t=new Smart.Utilities.DateTime(parseFloat(e.slice(0,e.length-21)));let a=e.slice(e.length-21),s=0;for(;a.length>0;)t[t._smallUnits[s]]=parseInt(a.slice(0,3),10),a=a.slice(3),s++;return t}static getConstructorParameters(e){return[e.year(),e.month(),e.day(),e.hour(),e.minute(),e.second(),e.millisecond(),e._microsecond,e._nanosecond,e._picosecond,e._femtosecond,e._attosecond,e._zeptosecond,e._yoctosecond,e.timeZone]}static detectDisplayMode(e,t,a){if(e.calendar.patterns[t])return-1!==["d","D","M","Y","d1","d2"].indexOf(t)?"calendar":-1!==["t","T","FT","PT"].indexOf(t)?"timePicker":"default";const s=["d","M","y"],i=["h","H","m","s","t","f","u","n","p","e","a","x","o"],r=a.groups;let n=!1,o=!1;for(let e=0;e<r.length;e++){const t=r[e].charAt(0);if(-1!==s.indexOf(t)?n=!0:-1!==i.indexOf(t)&&(o=!0),n&&o)break}return n===o?"default":n?"calendar":"timePicker"}static getLocalizedNames(e){const t={names:[],namesAbbr:[],namesShort:[]},a={names:[],namesAbbr:[]};if(this[e])return this[e];for(let a=23;a<30;a++){const s=new Date(2017,6,a),i=s.toLocaleString(e,{weekday:"long"});t.names.push(i),t.namesAbbr.push(s.toLocaleString(e,{weekday:"short"})),t.namesShort.push(i.substring(0,2))}for(let t=0;t<12;t++){const s=new Date(2017,t,1).toLocaleString(e,{month:"long"});a.names.push(s),a.namesAbbr.push(s.substring(0,3))}return a.names.push(""),a.namesAbbr.push(""),this[e]={days:t,months:a},this[e]}internalMS(){return this.dateData}getDatePart(e){const t=this,a=t.internalMS();let s=parseInt(a/t.millisPerDay);const i=parseInt(s/t.daysPer400Years);s-=i*t.daysPer400Years;let r=parseInt(s/t.daysPer100Years);4===r&&(r=3),s-=r*t.daysPer100Years;const n=parseInt(s/t.daysPer4Years);s-=n*t.daysPer4Years;let o=parseInt(s/t.daysPerYear);if(4===o&&(o=3),e===t.datePartYear)return parseInt(400*i+100*r+4*n+o+1);if(s-=o*t.daysPerYear,e===t.datePartDayOfYear)return parseInt(s+1);const d=3===o&&(24!==n||3===r)?t.daysToMonth366:t.daysToMonth365;let l=s>>6;for(;s>=d[l];)l++;return e===t.datePartMonth?parseInt(l):parseInt(s-d[l-1]+1)}dayOfWeek(){const e=this.dateData;return parseInt(e/this.millisPerDay+1)%7}dayOfYear(){return this.getDatePart(this.datePartDayOfYear)}weekOfYear(e){const t=this.toDate(),a=e||this.calendar.firstDay,s=new Date(t.getFullYear(),0,1),i=Math.floor((t.getTime()-s.getTime()-6e4*(t.getTimezoneOffset()-s.getTimezoneOffset()))/864e5)+1;let r,n=s.getDay()-a;if(n=n>=0?n:n+7,n<4){if(r=Math.floor((i+n-1)/7)+1,r>52){let e=new Date(t.getFullYear()+1,0,1).getDay()-a;e=e>=0?e:e+7,r=e<4?1:53}}else r=Math.floor((i+n-1)/7);return r}subtract(e){const t=this;return new Smart.Utilities.TimeSpan(t.dateData*t.ticksPerMillisecond-e.dateData*t.ticksPerMillisecond)}dateToMS(e,t,a){const s=this;if(e>=1&&e<=9999&&t>=1&&t<=12){e=parseInt(e);const i=s.isLeapYear(e)?s.daysToMonth366:s.daysToMonth365;if(a>=1&&a<=i[t]-i[t-1]){const r=e-1;return(365*r+parseInt(r/4)-parseInt(r/100)+parseInt(r/400)+i[t-1]+a-1)*s.millisPerDay}}}isLeapYear(e){if(e<1||e>9999)throw new Error("Year out of Range");return e%4==0&&(e%100!=0||e%400==0)}timeToMS(e,t,a,s){const i=this;if(e>=0&&e<24&&t>=0&&t<60&&a>=0&&a<60){const r=parseInt(3600*e+60*t+a);return s>0&&s<1e3?r*i.millisPerSecond+s:r*i.millisPerSecond}}daysInMonth(e,t){if(t<1||t>12)throw new Error("Month out of Range");const a=this,s=a.isLeapYear(e)?a.daysToMonth366:a.daysToMonth365;return s[t]-s[t-1]}arrayIndexOf(e,t){return e.indexOf(t)}startsWith(e,t){return 0===e.indexOf(t)}endsWith(e,t){return e.substr(e.length-t.length)===t}trim(e){return(e+"").replace(this.regexTrim,"")}expandFormat(e,t){t=t||"F";let a,s=e.patterns,i=t.length;if(s[t])return s[t];if(1===i){if(a=s[t],!a)throw"Invalid date format string '"+t+"'.";t=a}else 2===i&&"%"===t.charAt(0)&&(t=t.charAt(1));return t}getEra(e,t){if(!t)return 0;if("string"==typeof e)return 0;let a,s=e.getTime();for(let e=0,i=t.length;e<i;e++)if(a=t[e].start,null===a||s>=a)return e;return 0}toUpper(e){return e.split(" ").join(" ").toUpperCase()}toUpperArray(e){const t=[];for(let a=0,s=e.length;a<s;a++)t[a]=this.toUpper(e[a]);return t}getEraYear(e,t,a,s){let i=e.getFullYear();return!s&&t.eras&&(i-="number"==typeof a?a:t.eras[a].offset),i}getDayIndex(e,t,a){const s=this,i=e.days;let r,n=e._upperDays;return n||(e._upperDays=n=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr),s.toUpperArray(i.namesShort)]),t=t.toUpperCase(),a?(r=s.arrayIndexOf(n[1],t),-1===r&&(r=s.arrayIndexOf(n[2],t))):r=s.arrayIndexOf(n[0],t),r}getMonthIndex(e,t,a){const s=this;let i=e.months,r=e.monthsGenitive||e.months,n=e._upperMonths,o=e._upperMonthsGen;n||(e._upperMonths=n=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr)],e._upperMonthsGen=o=[s.toUpperArray(r.names),s.toUpperArray(r.namesAbbr)]),t=s.toUpper(t);let d=s.arrayIndexOf(a?n[1]:n[0],t);return d<0&&(d=s.arrayIndexOf(a?o[1]:o[0],t)),d}appendPreOrPostMatch(e,t){let a=0,s=!1;for(let i=0,r=e.length;i<r;i++){const r=e.charAt(i);switch(r){case"'":s?t.push("'"):a++,s=!1;break;case"\\":s&&t.push("\\"),s=!s;break;default:t.push(r),s=!1}}return a}getTokenRegExp(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyyy|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|uu|u|nn|n|pp|p|ee|e|aa|a|xx|x|oo|o|i{1,24}|zzz|zz|z|gg|g/g}static ParseDate(e,t){return(new Smart.Utilities.DateTime).tryparseDate(e,null,t)}tryparseDate(e,t,a){const s=this;if(null==t&&(t=s.calendar),void 0!==a){if(Array.isArray(a))for(let i=0;i<a.length;i++){const r=s.parseDate(e,a[i],t);if(r)return r}const i=s.parseDate(e,a,t);if(i)return i}if(""===e)return null;if(null==e||e.substring||(e=e.toString()),null!=e&&"/Date("===e.substring(0,6)){const t=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;let a=new Date(+e.replace(/\/Date\((\d+)\)\//,"$1"));if("Invalid Date"===a){const t=e.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);a=null,t&&(a=new Date(1*t[1]+36e5*t[2]+6e4*t[3]))}if(null==a||"Invalid Date"===a||isNaN(a)){const a=t.exec(e);if(a){const e=new Date(parseInt(a[1]));if(a[2]){let t=parseInt(a[3]);"-"===a[2]&&(t=-t);const s=e.getUTCMinutes();e.setUTCMinutes(s-t)}if(!isNaN(e.valueOf()))return e}}return a}const i={smartdate:"yyyy-MM-dd HH:mm:ss",d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",d4:"MM.dd.yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",custom3:"yyyy-MM-ddTHH:mm:ss.fff+HH:mm",custom4:"yyyy-MM-ddTHH:mm:ss.fff-HH:mm",custom5:"yyyy-MM-ddTHH:mm:ss.ffffff+HH:mm",custom6:"yyyy-MM-ddTHH:mm:ss.ffffff-HH:mm",iso:"yyyy-MM-ddTHH:mm:ssZ",iso2:"yyyy-MM-ddTHH:mm.fffZ",iso_date1:"yyyy-MM-dd",iso_date2:"yyyy-MM-dd",iso_date3:"yyyy-ddd",iso_date4:"yyyy-MM-dd HH:mm",iso_date5:"yyyy-MM-dd HH:mm Z",iso_date6:"yyyy-MMM-dd",iso_date7:"yyyy-MM",iso_date8:"yyyy-MMM",iso_date9:"yyyy-MMMM",iso_date10:"yyyy-MMMM-dd",iso_time1:"HH:mm:ss.tttt",iso_time2:"HH:mm:ss",iso_time3:"HH:mm",iso_time4:"HH",iso_time5:"yyyyyy-MM-dd",iso_time6:"yyyyyy-MM-dd"};for(let a in i){const r=s.parseDate(e,i[a],t);if(r)return r}const r=t.patterns;for(let a in r){const i=s.parseDate(e,r[a],t);if(i){if("ISO"===a){const a=s.parseDate(e,r.ISO2,t);if(a)return a}return i}}let n;if("string"==typeof e){const a=[":","/","-"," ",","];let i="",r=e=function(e,t,a){return a.replace(new RegExp(e,"g"),t)}(", ",",",e=s.trim(e));e.indexOf(":")>=0?(i=e.substring(e.indexOf(":")-2),i=s.trim(i),r=e.substring(0,e.indexOf(":")-2)):e.toUpperCase().indexOf("AM")>=0?(i=e.substring(e.toUpperCase().indexOf("AM")-2),i=s.trim(i),r=e.substring(0,e.toUpperCase().indexOf("AM")-2)):e.toUpperCase().indexOf("PM")>=0&&(i=e.substring(e.toUpperCase().indexOf("PM")-2),i=s.trim(i),r=e.substring(0,e.toUpperCase().indexOf("PM")-2));let o=new Date,d=!1;if(r){for(let e=0;e<a.length;e++)if(r.indexOf(a[e])>=0){n=r.split(a[e]);break}if(!n)return null;let e=new Array,i=new Array,l=new Array,f=null,m=null;for(let a=0;a<n.length;a++){const i=n[a],r=s.parseDate(i,"d",t)||s.parseDate(i,"dd",t)||s.parseDate(i,"ddd",t)||s.parseDate(i,"dddd",t);if(r&&(e.push(r.getDate()),i.length>2)){f=a;break}}for(let e=0;e<n.length;e++){const a=n[e],r=s.parseDate(a,"M",t)||s.parseDate(a,"MM",t)||s.parseDate(a,"MMM",t)||s.parseDate(a,"MMMM",t);if(r){if(null!=f&&f===e)continue;if(i.push(r.getMonth()),a.length>2){m=e;break}}}for(let e=0;e<n.length;e++){const a=n[e],i=s.parseDate(a,"yyyy",t);if(i){if(null!=f&&f===e)continue;if(null!=m&&m===e)continue;l.push(i.getFullYear())}}const c=new Array;for(let t=e.length-1;t>=0;t--)for(let a=0;a<i.length;a++)for(let s=0;s<l.length;s++){const r=new Date(l[s],i[a],e[t]);l[s]<1970&&r.setFullYear(l[s]),isNaN(r.getTime())||c.push(r)}c.length>0&&(o=c[0],d=!0)}if(i){const e=i.indexOf(":")>=0?i.split(":"):i,a=s.parseDate(i,"h:mm tt",t)||s.parseDate(i,"HH:mm:ss.fff",t)||s.parseDate(i,"HH:mm:ss.ff",t)||s.parseDate(i,"h:mm:ss tt",t)||s.parseDate(i,"HH:mm:ss.tttt",t)||s.parseDate(i,"HH:mm:ss",t)||s.parseDate(i,"HH:mm",t)||s.parseDate(i,"HH",t);let r=0,n=0,l=0,f=0;a&&!isNaN(a.getTime())?(r=a.getHours(),n=a.getMinutes(),l=a.getSeconds(),f=a.getMilliseconds()):(1===e.length&&(r=parseInt(e[0])),2===e.length&&(r=parseInt(e[0]),n=parseInt(e[1])),3===e.length&&(r=parseInt(e[0]),n=parseInt(e[1]),e[2].indexOf(".")>=0?(l=parseInt(e[2].toString().split(".")[0]),f=parseInt(e[2].toString().split(".")[1])):l=parseInt(e[2])),4===e.length&&(r=parseInt(e[0]),n=parseInt(e[1]),l=parseInt(e[2]),f=parseInt(e[3]))),!o||isNaN(r)||isNaN(n)||isNaN(l)||isNaN(f)||(o.setHours(r,n,l,f),d=!0)}if(d)return o}if(null!=e){n=[":","/","-"];let t=!0;for(let a=0;a<n.length;a++)-1!==e.indexOf(n[a])&&(t=!1);if(t){const t=new Number(e);if(!isNaN(t))return new Date(t)}}return null}getParseRegExp(e,t){const a=this;let s=e._parseRegExp;if(s){const e=s[t];if(e)return e}else e._parseRegExp=s={};let i,r=a.expandFormat(e,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),n=["^"],o=[],d=0,l=0,f=a.getTokenRegExp();for(;null!==(i=f.exec(r));){const e=r.slice(d,i.index);if(d=f.lastIndex,l+=a.appendPreOrPostMatch(e,n),l%2){n.push(i[0]);continue}let t,s=i[0],m=s.length;switch(s){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":t="(\\D+)";break;case"tt":case"t":t="(\\D*)";break;case"yyyyy":t="(\\d{1,4})";break;case"yyyy":t="(\\d{"+m+"})";break;case"fff":case"ff":case"f":t="(\\d{1,"+m+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":t="(\\d\\d?)";break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":t="(\\d{1,3})";break;case"zzz":t="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":t="([+-]?\\d\\d?)";break;case"/":t="/";break;default:if(!/i{1,24}/.test(s))throw"Invalid date format pattern '"+s+"'.";t="(\\d{"+s.length+"})"}t&&n.push(t),"/"!==s&&o.push(i[0])}a.appendPreOrPostMatch(r.slice(d),n),n.push("$");const m={regExp:n.join("").replace(/\s+/g,"\\s+"),groups:o};return s[t]=m}outOfRange(e,t,a){return e<t||e>a}expandYear(e,t){const a=this,s=new Date,i=a.getEra(s);if(t<100){let r=e.twoDigitYearMax;r="string"==typeof r?(new Date).getFullYear()%100+parseInt(r,10):r;const n=a.getEraYear(s,e,i);(t+=n-n%100)>r&&(t-=100)}return t}padZeros(e,t){let a,s=e+"";return t>1&&s.length<t?(a=["0","00","000"][t-2]+s,a.substr(a.length-t,t)):(a=s,a)}parseDate(e,t,a){const s=this;null==a&&(a=s.calendar),e=s.trim(e);const i=a,r=s.getParseRegExp(i,t),n=new RegExp(r.regExp).exec(e);if(null===n)return null;let o,d=r.groups,l=null,f=null,m=null,c=null,u=null,p=0,y=0,g=0,h=0,T=null,M=!1;for(let e=0,t=d.length;e<t;e++){const t=n[e+1];if(t){const a=d[e],r=a.length,n=parseInt(t,10);switch(a){case"dd":case"d":if(c=n,s.outOfRange(c,1,31))return null;break;case"MMM":case"MMMM":case"MMMMM":case"MMMMMM":case"MMMMMMM":case"MMMMMMMM":if(m=s.getMonthIndex(i,t,3===r),s.outOfRange(m,0,11))return null;break;case"M":case"MM":if(m=n-1,s.outOfRange(m,0,11))return null;break;case"y":case"yy":case"yyyy":if(f=r<4?s.expandYear(i,n):n,s.outOfRange(f,0,9999))return null;break;case"h":case"hh":if(p=n,12===p&&(p=0),s.outOfRange(p,0,11))return null;break;case"H":case"HH":if(p=n,s.outOfRange(p,0,23))return null;break;case"m":case"mm":if(y=n,s.outOfRange(y,0,59))return null;break;case"s":case"ss":if(g=n,s.outOfRange(g,0,59))return null;break;case"tt":case"t":if(M=i.PM&&(t===i.PM[0]||t===i.PM[1]||t===i.PM[2]),!M&&(!i.AM||t!==i.AM[0]&&t!==i.AM[1]&&t!==i.AM[2]))return null;break;case"f":case"ff":case"fff":if(h=n*Math.pow(10,3-r),s.outOfRange(h,0,999))return null;break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":if(s.outOfRange(n,0,1e3))return null;s[s._codeToUnit[a]]=n;break;case"ddd":case"dddd":if(u=s.getDayIndex(i,t,3===r),s.outOfRange(u,0,6))return null;break;case"zzz":{const e=t.split(/:/);if(2!==e.length)return null;if(o=parseInt(e[0],10),s.outOfRange(o,-12,13))return null;const a=parseInt(e[1],10);if(s.outOfRange(a,0,59))return null;T=60*o+(s.startsWith(t,"-")?-a:a);break}case"z":case"zz":if(o=n,s.outOfRange(o,-12,13))return null;T=60*o;break;case"g":case"gg":{let e=t;if(!e||!i.eras)return null;e=this.trim(e.toLowerCase());for(let t=0,a=i.eras.length;t<a;t++)if(e===i.eras[t].nathat.toLowerCase()){l=t;break}if(null===l)return null;break}default:{let e=t;e.length%3==1?e+="00":e.length%3==2&&(e+="0"),h=parseInt(e.slice(0,3),10),e=e.slice(3);let a=0;for(;e.length>0;)s[s._smallUnits[a]]=parseInt(e.slice(0,3),10),e=e.slice(3),a++}}}}let S,D=new Date,H=i.convert;if(S=D.getFullYear(),null===f?f=S:i.eras&&(f+=i.eras[l||0].offset),null===m&&(m=0),null===c&&(c=1),H){if(D=H.toGregorian(f,m,c),null===D)return null}else{if(D.setFullYear(f,m,c),D.getDate()!==c)return null;if(null!==u&&D.getDay()!==u)return null}if(M&&p<12&&(p+=12),D.setHours(p,y,g,h),null!==T){const e=D.getMinutes()-(T+D.getTimezoneOffset());D.setHours(D.getHours()+parseInt(e/60,10),e%60)}return D}toString(e,t){const a=this;void 0===e&&(e="yyyy-MM-dd HH:mm:ss");const s=a.dateData.toString()+a.getFractionsOfSecondStamp()+e+(a.timeZone||"");if(Smart.Utilities.DateTime.cache&&Smart.Utilities.DateTime.cache[s]&&!1!==a.showTodayDateAsString)return Smart.Utilities.DateTime.cache[s];const i=a.toDate();if(null==t&&(t=a.calendar),"string"==typeof i)return i;if(!e||!e.length||"i"===e){let e;return e=a.formatDate(i,t.patterns.F,t),e}const r=t.eras,n="s"===e;e=a.expandFormat(t,e);const o=[];let d,l=0,f=a.getTokenRegExp();function m(e,t){if(void 0!==e.getMonth)switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate()}}for(;;){const s=f.lastIndex,c=f.exec(e),u=e.slice(s,c?c.index:e.length);if(l+=a.appendPreOrPostMatch(u,o),!c)break;if(l%2){o.push(c[0]);continue}const p=c[0],y=p.length;let g;if(/i{1,24}/.test(p))o.push(a.getFirstNDigitsOfPrecision(p.length));else switch(p){case"ddd":case"dddd":{const e=3===y?t.days.namesAbbr:t.days.names;o.push(e[i.getDay()]);break}case"d":case"dd":o.push(a.padZeros(m(i,2),y));break;case"MMM":case"MMMM":g=m(i,1),o.push(t.months[3===y?"namesAbbr":"names"][g]);break;case"M":case"MM":o.push(a.padZeros(m(i,1)+1,y));break;case"y":case"yy":case"yyyy":g=a.getEraYear(i,t,a.getEra(i,r),n),y<4&&(g%=100),o.push(a.padZeros(g,y));break;case"h":case"hh":d=i.getHours()%12,0===d&&(d=12),o.push(a.padZeros(d,y));break;case"H":case"HH":o.push(a.padZeros(i.getHours(),y));break;case"m":case"mm":o.push(a.padZeros(i.getMinutes(),y));break;case"s":case"ss":o.push(a.padZeros(i.getSeconds(),y));break;case"t":case"tt":g=i.getHours()<12?t.AM?t.AM[0]:" ":t.PM?t.PM[0]:" ",o.push(1===y?g.charAt(0):g);break;case"f":case"ff":case"fff":o.push(a.padZeros(i.getMilliseconds(),3).substr(0,y));break;case"u":case"n":case"p":case"e":case"a":case"x":case"o":o.push(a[a._codeToUnit[p]]);break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":o.push(a.padZeros(a[a._codeToUnit[p]],3));break;case"z":case"zz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),y));break;case"zzz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),2)+":"+a.padZeros(60*Math.abs(a.timeZoneOffsetHours%1),2));break;case"g":case"gg":t.eras&&o.push(t.eras[a.getEra(i,r)].name);break;case"/":o.push(t["/"]);break;default:throw"Invalid date format pattern '"+p+"'."}}let c=o.join("");if(Smart.Utilities.DateTime.cache||(Smart.Utilities.DateTime.cache=new Array),a._today||(a._today=new Date),a.calendar&&a.calendar.today&&-1===e.indexOf(":")&&i.getFullYear()===a._today.getFullYear()&&i.getDate()===a._today.getDate()&&i.getMonth()===a._today.getMonth()){if(!1===a.showTodayDateAsString)return Smart.Utilities.DateTime.cache[s]=c,c;c=a.calendar.today}return Smart.Utilities.DateTime.cache[s]=c,c}getFractionsOfSecondStamp(){const e=this;return e._microsecond.toString()+e._nanosecond+e._picosecond+e._femtosecond+e._attosecond+e._zeptosecond+e._yoctosecond}getFirstNDigitsOfPrecision(e,t){const a=this;return(""+(!0!==t?a.padZeros(a.millisecond(),3):"")+a.padZeros(a._microsecond,3)+a.padZeros(a._nanosecond,3)+a.padZeros(a._picosecond,3)+a.padZeros(a._femtosecond,3)+a.padZeros(a._attosecond,3)+a.padZeros(a._zeptosecond,3)+a.padZeros(a._yoctosecond,3)).slice(0,e)}copySmallTimePartValues(e){const t=this;e._microsecond=t._microsecond,e._nanosecond=t._nanosecond,e._picosecond=t._picosecond,e._femtosecond=t._femtosecond,e._attosecond=t._attosecond,e._zeptosecond=t._zeptosecond,e._yoctosecond=t._yoctosecond}add(e,t,a){const s=this,i=s.internalMS();if(void 0===t){if(!1===a)return s.dateData=i+parseInt(e._ticks/s.ticksPerMillisecond),s;const t=new Smart.Utilities.DateTime(i+parseInt(e._ticks/s.ticksPerMillisecond));return s.copyTimeZone(t),s.copySmallTimePartValues(t),t}const r=e*t;if(r<=-s.maxMillis||r>=s.maxMillis)throw new Error("Out of Range");if(!1===a)return s.dateData=i+r,s;const n=new Smart.Utilities.DateTime(i+r);return s.copyTimeZone(n),s.copySmallTimePartValues(n),n}addDays(e,t){return this.add(e,this.millisPerDay,t)}clone(){const e=this,t=new Smart.Utilities.DateTime(e.dateData);return e.copyTimeZone(t),e.copySmallTimePartValues(t),t}clearTime(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s,0,0,0,0);return e.copyTimeZone(i),i}addHours(e,t){return this.add(e,this.millisPerHour,t)}addDeciseconds(e,t){return this.add(100*e,1,t)}addCentiseconds(e,t){return this.add(10*e,1,t)}addMilliseconds(e,t){return this.add(e,1,t)}addMinutes(e,t){return this.add(e,this.millisPerMinute,t)}addMonths(e,t){const a=this;if(e<-12e4||e>12e4)throw new Error("Invalid Months Value");let s=parseInt(a.getDatePart(a.datePartYear)),i=parseInt(a.getDatePart(a.datePartMonth)),r=parseInt(a.getDatePart(a.datePartDay));if(e%12==0)s+=e/12;else{const t=i-1+e;t>=0?(i=t%12+1,s+=t/12):(i=12+(t+1)%12,s+=(t-11)/12),s=parseInt(s)}if(s<1||s>9999)throw new Error("Year out of range");const n=a.daysInMonth(s,i);if(r>n&&(r=n),!1===t)return a.dateData=a.dateToMS(s,i,r)+a.internalMS()%a.millisPerDay,a;const o=new Smart.Utilities.DateTime(a.dateToMS(s,i,r)+a.internalMS()%a.millisPerDay);return a.copyTimeZone(o),a.copySmallTimePartValues(o),o}addSeconds(e,t){return this.add(e,this.millisPerSecond,t)}addYears(e,t){return this.addMonths(12*e,t)}addMicroseconds(e,t){if(0===e)return;const a=this;let s,i;e<0&&0===a.hour()&&0===a.minute()&&0===a.second()&&0===a.millisecond()&&0===a._microsecond&&(s=parseInt(e/1e3,10)-1,i=1e3+e%1e3);const r=1e3*a.timeToMS(a.hour(),a.minute(),a.second(),a.millisecond())+a._microsecond,n=r+e;let o;if(void 0===s&&(s=parseInt(n/1e3,10)-parseInt(r/1e3,10)),void 0===i&&(i=parseInt(n%1e3,10)),0!==s&&(o=a.addMilliseconds(s,t)),!1!==t)return o||(o=a.clone()),o._microsecond=i,o;a._microsecond=i}addFractionsOfSecond(e,t,a,s,i){if(0===e)return;const r=this,n=1e3*r[s]+r[a],o=e+n;let d,l=parseInt(o/1e3,10)-parseInt(n/1e3,10),f=parseInt(o%1e3,10);if(e<0&&o<0&&f<0&&(l--,f=1e3+f),0!==l&&(d=r[i](l,t)),!1!==t)return d||(d=r.clone()),d[a]=f,d;r[a]=f}addNanoseconds(e,t){return this.addFractionsOfSecond(e,t,"_nanosecond","_microsecond","addMicroseconds")}addPicoseconds(e,t){return this.addFractionsOfSecond(e,t,"_picosecond","_nanosecond","addNanoseconds")}addFemtoseconds(e,t){return this.addFractionsOfSecond(e,t,"_femtosecond","_picosecond","addPicoseconds")}addAttoseconds(e,t){return this.addFractionsOfSecond(e,t,"_attosecond","_femtosecond","addFemtoseconds")}addZeptoseconds(e,t){return this.addFractionsOfSecond(e,t,"_zeptosecond","_attosecond","addAttoseconds")}addYoctoseconds(e,t){return this.addFractionsOfSecond(e,t,"_yoctosecond","_zeptosecond","addZeptoseconds")}getTimeZoneOffset(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),s=e.getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset());return{offset:-e.getTimezoneOffset()/60,dst:+s}}isInDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return this.date().getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset())}supportsDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return t.getTimezoneOffset()!==a.getTimezoneOffset()}date(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s);return e.copyTimeZone(i),i}isWeekend(){return 0===this.dayOfWeek()||6===this.dayOfWeek()}toDate(e){const t=this,a=t.month(),s=t.year(),i=t.day(),r=t.hour(),n=t.minute(),o=t.second(),d=t.millisecond();let l=new Date(s,a-1,i);if(s<1970&&l.setFullYear(s),l.setHours(r,n,o,d),e){const a=t.timeZones.filter((function(t){return t.id===e}));if(a.length){let e=a[0].offset;const s=l.getTime();let i=60*l.getTimezoneOffset()*1e3;if(t.timeZone){const e=t.timeZones.filter((function(e){return e.id===t.timeZone}));e.length&&(i=60*-e[0].offset*1e3)}l=new Date(s+i+6e4*e)}}return l}toTimeZone(e){const t=this;let a=e;if(null==a&&(a="Local"),t.timeZone===a)return t.clone();const s=t.timeZones.filter((function(e){return e.id===a}));if(0===s.length)return t.clone();const i=this.toDate(a),r=new Smart.Utilities.DateTime(i);return r.timeZone=a,r.timeZoneOffset=s[0].offset,r.timeZoneOffsetHours=s[0].offsetHours,t.copySmallTimePartValues(r),r}day(){return this.getDatePart(this.datePartDay)}month(){return this.getDatePart(this.datePartMonth)}year(){return this.getDatePart(this.datePartYear)}millisecond(){return parseInt(this.internalMS()%1e3)}hour(){return parseInt(Math.floor(this.internalMS()/this.millisPerHour)%24)}minute(){return parseInt(this.internalMS()/this.millisPerMinute%60)}second(){return parseInt(this.internalMS()/this.millisPerSecond%60)}microsecond(){return this._microsecond}nanosecond(){return this._nanosecond}picosecond(){return this._picosecond}femtosecond(){return this._femtosecond}attosecond(){return this._attosecond}zeptosecond(){return this._zeptosecond}yoctosecond(){return this._yoctosecond}valueOf(){return this.dateData}equals(e){const t=this;return t.dateData===e.dateData&&t._microsecond===e._microsecond&&t._nanosecond===e._nanosecond&&t._picosecond===e._picosecond&&t._femtosecond===e._femtosecond&&t._attosecond===e._attosecond&&t._zeptosecond===e._zeptosecond&&t._yoctosecond===e._yoctosecond}equalDateParts(e){const t=this;return t.year()===e.year()&&t.month()===e.month()&&t.day()===e.day()}compare(e){const t=this;if(t.equals(e))return 0;const a=["dateData","_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"];for(let s=0;s<a.length;s++){const i=a[s];if(t[i]>e[i])return 1;if(t[i]<e[i])return-1}return 0}toDateString(){return this.toDate().toDateString()}toLocaleDateString(){return this.toDate().toLocaleDateString(this.calendar.locale)}toLocaleString(){return this.toDate().toLocaleString(this.calendar.locale)}toLocaleTimeString(){return this.toDate().toLocaleTimeString(this.calendar.locale)}validateTimeZone(e){const t=this;if("string"!=typeof e)return;const a=t.timeZones.filter((function(t){return t.id===e}));0!==a.length&&(t.timeZone=e,t.timeZoneOffset=a[0].offset,t.timeZoneOffsetHours=a[0].offsetHours)}copyTimeZone(e){const t=this;e.timeZone=t.timeZone,e.timeZoneOffset=t.timeZoneOffset,e.timeZoneOffsetHours=t.timeZoneOffsetHours}getTimeStamp(){return new Smart.Utilities.BigNumber(this.dateData.toString()+this.getFirstNDigitsOfPrecision(void 0,!0))}})})();
/***/ }),
/***/ 6321:
/***/ (() => {
!function(){const e="16.0.0",t=[];let n="Smart";if(window[n]&&window[n].Version){if(window[n].Version===e)return;if(window[n].Version!==e)n+=e;else{let e=2;for(;window[n];)n+=e.toString(),e++}}const r=navigator.userAgent.indexOf("Edge")>-1&&navigator.appVersion.indexOf("Edge")>-1;document.elementsFromPoint||(document.elementsFromPoint=document.msElementsFromPoint);class o{static isBoolean(e){return"boolean"==typeof e}static isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)}static isArray(e){return Array.isArray(e)}static isObject(e){return e&&("object"==typeof e||this.isFunction(e))||!1}static isDate(e){return e instanceof Date}static isString(e){return"string"==typeof e}static isNumber(e){return"number"==typeof e}static getType(e){const t=this,n=["Boolean","Number","String","Function","Array","Date","Object"].find((n=>{if(t["is"+n](e))return n}));return n?n.toLowerCase():void 0}}class i{static animate(e,t,r,o){const i=e;if(!i||i instanceof HTMLElement==0)return;if(0===i.getElementsByClassName("smart-ripple").length){const e=document.createElement("span");e.classList.add("smart-ripple"),e.setAttribute("role","presentation");let t=!0,r=null;if(window[n].EnableShadowDOM&&i.enableShadowDOM&&!0!==i.isInShadowDOM){for(let e=0;e<i.shadowRoot.host.shadowRoot.children.length;e++)"link"!==i.shadowRoot.host.shadowRoot.children[e].tagName.toLowerCase()&&(r=i.shadowRoot.host.shadowRoot.children[e]);i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple")&&(t=!1)}else r=i.firstElementChild;t&&(r&&!r.noRipple&&r.offsetHeight>0?r.appendChild(e):i.appendChild(e))}let s=null;if(s=window[n].EnableShadowDOM&&i.shadowRoot?i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple"):i.getElementsByClassName("smart-ripple")[0],!s)return;s.innerHTML="",s.classList.remove("smart-animate"),s.style.height=s.style.width=Math.max(i.offsetHeight,i.offsetWidth)+"px";const a=window.getComputedStyle(s.parentElement),l=parseInt(a.borderLeftWidth)||0,d=parseInt(a.borderTopWidth)||0,c=i.getBoundingClientRect(),u=t-(c.left+window.pageXOffset)-s.offsetWidth/2-l,p=r-(c.top+window.pageYOffset)-s.offsetHeight/2-d;s.style.left=u+"px",s.style.top=p+"px",s.classList.add("smart-animate"),s.addEventListener("animationend",(function e(){s.parentElement&&s.parentElement.removeChild(s),o&&o(),s.removeEventListener("animationend",e),s.removeEventListener("animationcancel",e)})),s.addEventListener("animationcancel",(function e(){s.parentElement&&s.parentElement.removeChild(s),o&&o(),s.removeEventListener("animationcancel",e),s.removeEventListener("animationend",e)}))}}class s{static easeInQuad(e,t,n,r){return n*(e/=r)*e+t}static easeOutQuad(e,t,n,r){return-n*(e/=r)*(e-2)+t}static easeInOutQuad(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}static easeInCubic(e,t,n,r){return n*(e/=r)*e*e+t}static easeOutCubic(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}static easeInOutCubic(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t}static easeInQuart(e,t,n,r){return n*(e/=r)*e*e*e+t}static easeOutQuart(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t}static easeInOutQuart(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t}static easeInQuint(e,t,n,r){return n*(e/=r)*e*e*e*e+t}static easeOutQuint(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t}static easeInOutQuint(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t}static easeInSine(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t}static easeOutSine(e,t,n,r){return n*Math.sin(e/r*(Math.PI/2))+t}static easeInOutSine(e,t,n,r){return-n/2*(Math.cos(Math.PI*e/r)-1)+t}static easeInExpo(e,t,n,r){return 0===e?t:n*Math.pow(2,10*(e/r-1))+t}static easeOutExpo(e,t,n,r){return e===r?t+n:n*(1-Math.pow(2,-10*e/r))+t}static easeInOutExpo(e,t,n,r){return 0===e?t:e===r?t+n:(e/=r/2)<1?n/2*Math.pow(2,10*(e-1))+t:n/2*(2-Math.pow(2,-10*--e))+t}static easeInCirc(e,t,n,r){return-n*(Math.sqrt(1-(e/=r)*e)-1)+t}static easeOutCirc(e,t,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+t}static easeInOutCirc(e,t,n,r){return(e/=r/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+t:n/2*(Math.sqrt(1-(e-=2)*e)+1)+t}static easeInElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)+t)}static easeOutElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/i)+n+t)}static easeInOutElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:2==(e/=r/2)?t+n:(i||(i=r*(.3*1.5)),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)*-.5+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)*.5+n+t)}static easeInBack(e,t,n,r,o){return void 0===o&&(o=1.70158),n*(e/=r)*e*((o+1)*e-o)+t}static easeOutBack(e,t,n,r,o){return void 0===o&&(o=1.70158),n*((e=e/r-1)*e*((o+1)*e+o)+1)+t}static easeInOutBack(e,t,n,r,o){return void 0===o&&(o=1.70158),(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t}static easeInBounce(e,t,n,r){return n-this.easeOutBounce(r-e,0,n,r)+t}static easeOutBounce(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}static easeInOutBounce(e,t,n,r){return e<r/2?.5*this.easeInBounce(2*e,0,n,r)+t:.5*this.easeOutBounce(2*e-r,0,n,r)+.5*n+t}}class a{static get isMobile(){const e=/(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());return e||["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}static get Browser(){let e;const t=function(t){let n=t.indexOf(e);if(-1===n)return;const r=t.indexOf("rv:");return"Trident"===e&&-1!==r?parseFloat(t.substring(r+3)):parseFloat(t.substring(n+e.length+1))};let n={};return n[function(){const t=[{string:navigator.userAgent,subString:"Edge",identity:"Edge"},{string:navigator.userAgent,subString:"MSIE",identity:"IE"},{string:navigator.userAgent,subString:"Trident",identity:"IE"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Opera",identity:"Opera"},{string:navigator.userAgent,subString:"OPR",identity:"Opera"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"Safari",identity:"Safari"}];for(let n=0;n<t.length;n++){let r=t[n].string;if(e=t[n].subString,-1!==r.indexOf(t[n].subString))return t[n].identity}return"Other"}()]=!0,n.version=t(navigator.userAgent)||t(navigator.appVersion)||"Unknown",n}static toCamelCase(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}static toDash(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}static unescapeHTML(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}static escapeHTML(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(e=>t[e]))}static sanitizeHTML(e){if(e&&(e.indexOf("onclick")>=0||e.indexOf("onload")>=0||e.indexOf("onerror")>=0))return this.escapeHTML(e);const t=new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>","ig");return String(e).replace(t,(e=>this.escapeHTML(e)))}static createGUID(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static getScriptLocation(){return"./"!==window[n].BaseUrl?window[n].BaseUrl:function(){if(document.currentScript){let e=document.currentScript.src,t=e.lastIndexOf("/");return e=e.substring(0,t),e}const e=new Error;let t="(",n=")";if(Smart.Utilities.Core.Browser.Safari&&(t="@",n="\n"),e.fileName)return e.fileName.replace("/smart.element.js","");let r=e.stack.split(t);return r=r[1],r=r.split(n)[0],r=r.split(":"),r.splice(-2,2),r=r.join(":"),r.replace("/smart.element.js","")}()}static CSSVariablesSupport(){return window.CSS&&window.CSS.supports&&window.CSS.supports("(--fake-var: 0)")}static assign(e,t){const n=e=>e&&"object"==typeof e&&!Array.isArray(e)&&null!==e;let r=Object.assign({},e);return n(e)&&n(t)&&Object.keys(t).forEach((o=>{n(t[o])?o in e?r[o]=this.assign(e[o],t[o]):Object.assign(r,{[o]:t[o]}):Object.assign(r,{[o]:t[o]})})),r}static html(e,t){const n=this;let r="",o=e.childNodes;if(!t){for(let e,t=0,i=o.length;t<i&&(e=o[t]);t++){const t=["strong"];if(e instanceof HTMLElement||e.tagName&&t.indexOf(e.tagName.toLowerCase())>=0){const t=e.tagName.toLowerCase(),o=e.attributes;let i="<"+t;for(let e,t=0;e=o[t];t++)i+=" "+e.name+'="'+e.value.replace(/[&\u00A0"]/g,y.Core.escapeHTML)+'"';i+=">",["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"][t]&&(r+=i),r=r+i+n.html(e)+"</"+t+">"}else{if(8===e.nodeType)continue;r+=e.textContent.replace(/[&\u00A0<>]/g,y.Core.escapeHTML)}}return r}{const n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;e.innerHTML=t.replace(n,"<$1></$2>")}}}let l=[];class d{static watch(e){switch(e.nodeName.toLowerCase()){case"smart-grid":case"smart-kanban":case"smart-table":case"smart-pivot-table":case"smart-scheduler":case"smart-tabs":case"smart-card-view":case"smart-list-box":case"smart-combo-box":case"smart-drop-down-list":case"smart-calendar":case"smart-gauge":case"smart-numeric-text-box":case"smart-menu":case"smart-tree":l.push(e);break;default:return}d.start()}static start(){d.isStarted||(d.isStarted=!0,d.interval&&clearInterval(d.interval),0===l.length||document.hidden?d.isStarted=!1:d.interval=setInterval((function(){d.observe()}),100))}static stop(){d.isStarted=!1,d.interval&&clearInterval(d.interval)}static observeElement(e){const t=e;if("test"===window.Smart.Mode||document.hidden)return void(d.interval&&clearInterval(d.interval));let n=e._computedStyle||"resize"!==t.hasStyleObserver?document.defaultView.getComputedStyle(t,null):{},r=!0,o="resize"!==t.hasStyleObserver?["paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","display","visibility","font-size","font-family","font-style","font-weight","max-height","min-height","max-width","min-width","overflow","overflow-x","overflow-y"]:[];if(e.styleProperties&&(o=o.concat(e.styleProperties)),e.observableStyleProperties&&(o=e.observableStyleProperties),!t._styleInfo){t._styleInfo=[];for(let e=0;e<o.length;e++){const r=o[e],i=r.startsWith("--")?n.getPropertyValue(r):n[r];t._styleInfo[r]=i}return}if(e.isHidden||"none"!==n.display&&(0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0)),e.isHidden){if(e.visibilityChangedHandler(),e.isHidden)return;r=!1}let i=[];for(let e=0;e<o.length;e++){const r=o[e],s=r.startsWith("--")?n.getPropertyValue(r):n[r];t._styleInfo[r]!==s&&(i[r]={oldValue:t._styleInfo[r],value:s},i.length++),t._styleInfo[r]=s}i.length>0&&(t.$.fireEvent("styleChanged",{styleProperties:i},{bubbles:!1,cancelable:!0}),i.display&&r&&t.$.fireEvent("resize",t,{bubbles:!1,cancelable:!0}))}static observe(){for(let e=0;e<l.length;e++){const t=l[e];this.observeElement(t)}}static unwatch(e){d.stop();const t=l.indexOf(e);-1!==t&&l.splice(t,1),d.start()}}let c=[];const u=[],p=["resize","down","up","move","tap","taphold","swipeleft","swiperight","swipetop","swipebottom"];class h{constructor(e){const t=this;t.target=e,t.$target=new f(e),t.$document=e.$document?e.$document:new f(document),t.id=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase();let n={handlers:{},boundEventTypes:[],listen:t.listen.bind(t),unlisten:t.unlisten.bind(t)};return t.tapHoldDelay=750,t.swipeMin=10,t.swipeMax=5e3,t.swipeDelay=1e3,t.tapHoldDelay=750,t.inputEventProperties=["clientX","clientY","pageX","pageY","screenX","screenY"],p.forEach((e=>{n[e]=t=>{n.handlers[e]=t},t[e]=e=>{if(!n.handlers[e.type]){if(("mousemove"===e.type||"pointermove"===e.type||"touchmove"===e.type)&&n.handlers.move){const r=t.createEvent(e,"move");n.handlers.move(r)}return!0}return n.handlers[e.type](e)}})),t.listen(),t.handlers=n.handlers,n}listen(e){const t=this;if("resize"===e&&t.target!==document&&t.target!==window&&!1!==t.target.hasResizeObserver)if(Smart.Utilities.Core.Browser.Firefox){if(!t.target.resizeObserver){let e,n,r,o=!1,i=t.target.offsetWidth,s=t.target.offsetHeight;const a=new ResizeObserver((()=>{if(!o)return void(o=!0);const a=new CustomEvent("resize",{bubbles:!1,cancelable:!0});n=t.target.offsetWidth,r=t.target.offsetHeight,e=n!==i||r!==s,t.target.requiresLayout&&(e=!0),e&&(t.resize(a),t.target.requiresLayout=!1)}));a.observe(t.target),t.target.resizeObserver=a}}else if(!t.target.resizeTrigger){const e=document.createElement("div");e.className="smart-resize-trigger-container",e.innerHTML='<div class="smart-resize-trigger-container"><div class="smart-resize-trigger"></div></div><div class="smart-resize-trigger-container"><div class="smart-resize-trigger-shrink"></div></div>',e.setAttribute("aria-hidden",!0),window[n].EnableShadowDOM&&t.target.shadowRoot?t.target.shadowRoot.appendChild(e):t.target.appendChild(e),t.target.resizeTrigger=e;const r=e.childNodes[0],o=r.childNodes[0],i=e.childNodes[1],s=function(){o.style.width="100000px",o.style.height="100000px",r.scrollLeft=1e5,r.scrollTop=1e5,i.scrollLeft=1e5,i.scrollTop=1e5};let a,l,d,c,u=t.target.offsetWidth,p=t.target.offsetHeight;if(0===u||0===p){const e=function(){s(),t.target.removeEventListener("resize",e)};t.target.addEventListener("resize",e),s()}else s();t.target.resizeHandler=function(){l||(l=requestAnimationFrame((function(){if(l=0,d=t.target.offsetWidth,c=t.target.offsetHeight,a=d!==u||c!==p,t.target.requiresLayout&&(a=!0),!a)return;u=d,p=c;const e=new CustomEvent("resize",{bubbles:!1,cancelable:!0});t.resize(e),t.target.requiresLayout=!1}))),s()},r.addEventListener("scroll",t.target.resizeHandler),i.addEventListener("scroll",t.target.resizeHandler)}t.isListening||(t.isListening=!0,t.isPressed=!1,t.isReleased=!1,t.isInBounds=!1,window.PointerEvent?(t.$target.listen("pointerdown.inputEvents"+t.id,t.pointerDown.bind(t)),t.$target.listen("pointerup.inputEvents"+t.id,t.pointerUp.bind(t)),t.$target.listen("pointermove.inputEvents"+t.id,t.pointerMove.bind(t)),t.$target.listen("pointercancel.inputEvents"+t.id,t.pointerCancel.bind(t))):("ontouchstart"in window&&(t.$target.listen("touchmove.inputEvents"+t.id,t.touchMove.bind(t)),t.$target.listen("touchstart.inputEvents"+t.id,t.touchStart.bind(t)),t.$target.listen("touchend.inputEvents"+t.id,t.touchEnd.bind(t)),t.$target.listen("touchcancel.inputEvents"+t.id,t.touchCancel.bind(t))),t.$target.listen("mousedown.inputEvents"+t.id,t.mouseDown.bind(t)),t.$target.listen("mouseup.inputEvents"+t.id,t.mouseUp.bind(t)),t.$target.listen("mousemove.inputEvents"+t.id,t.mouseMove.bind(t)),t.$target.listen("mouseleave.inputEvents"+t.id,t.mouseLeave.bind(t))),t.target._handleDocumentUp||(t.target._handleDocumentUp=t.handleDocumentUp.bind(t),t.target._handleDocumentUpId=t.id,t.$document.listen("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp)))}unlisten(e){const t=this;if(t.isListening=!1,window.PointerEvent?(t.$target.unlisten("pointerdown.inputEvents"+t.id),t.$target.unlisten("pointerup.inputEvents"+t.id),t.$target.unlisten("pointermove.inputEvents"+t.id),t.$target.unlisten("pointercancel.inputEvents"+t.id)):("ontouchstart"in window&&(t.$target.unlisten("touchstart.inputEvents"+t.id),t.$target.unlisten("touchmove.inputEvents"+t.id),t.$target.unlisten("touchend.inputEvents"+t.id),t.$target.unlisten("touchcancel.inputEvents"+t.id)),t.$target.unlisten("mousedown.inputEvents"+t.id),t.$target.unlisten("mouseup.inputEvents"+t.id),t.$target.unlisten("mousemove.inputEvents"+t.id),t.$target.unlisten("mouseleave.inputEvents"+t.id)),t.target._handleDocumentUp&&(t.$document.unlisten("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp),delete t.target._handleDocumentUp,delete t.target._handleDocumentUpId),"resize"===e)if(Smart.Utilities.Core.Browser.Firefox)t.target.resizeObserver&&(t.target.resizeObserver.unobserve(t.target),delete t.target.resizeObserver);else if(t.target.resizeTrigger){const e=t.target.resizeTrigger,n=e.childNodes[0],r=e.childNodes[1];n.removeEventListener("scroll",t.target.resizeHandler),r.removeEventListener("scroll",t.target.resizeHandler),t.target.resizeHandler=null,e.parentNode.removeChild(e),delete t.target.resizeTrigger}}handleDocumentUp(e){const t=this;t.isPressed=!1,t.isReleased=!1,t.resetSwipe(e)}createEvent(e,t){const n=this,r=e.touches,o=e.changedTouches,i=r&&r.length?r[0]:o&&o.length?o[0]:void 0,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:void 0!==n.$target.element.getRootNode().host});if(s.originalEvent=e,i){for(let e=0;e<n.inputEventProperties.length;e++){const t=n.inputEventProperties[e];s[t]=i[t]}return s}for(let t in e)t in s||(s[t]=e[t]);return s}fireTap(e){const t=this;if(clearTimeout(this.tapHoldTimeout),!this.tapHoldFired&&this.isInBounds){const n=t.createEvent(e,"tap");t.tap(n)}}initTap(e){const t=this;t.isInBounds=!0,t.tapHoldFired=!1,t.tapHoldTimeout=setTimeout((function(){if(t.isInBounds){t.tapHoldFired=!0;const n=t.createEvent(e,"taphold");t.taphold(n)}}),t.tapHoldDelay)}pointerDown(e){return this.handleDown(e)}mouseDown(e){const t=this;if(!(t.isPressed||t.touchStartTime&&new Date-t.touchStartTime<500))return t.handleDown(e)}touchStart(e){const t=this;return t.touchStartTime=new Date,t.isTouchMoved=!0,t.handleDown(e)}mouseUp(e){const t=this;if(!(t.isReleased||t.touchEndTime&&new Date-t.touchEndTime<500))return t.handleUp(e)}handleDown(e){const t=this;t.isReleased=!1,t.isPressed=!0;const n=t.createEvent(e,"down");return(t.handlers.tap||t.handlers.taphold)&&t.initTap(n),(t.handlers.swipeleft||t.handlers.swiperight||t.handlers.swipetop||t.handlers.swipebottom)&&t.initSwipe(n),t.down(n)}handleUp(e){const t=this;t.isReleased=!0,t.isPressed=!1;const n=t.createEvent(e,"up"),r=t.up(n);return(t.handlers.tap||t.handlers.taphold)&&t.fireTap(n),t.resetSwipe(n),r}handleMove(e){const t=this;let n=t.move(e);return t.isPressed&&(t._maxSwipeVerticalDistance=Math.max(t._maxSwipeVerticalDistance,Math.abs(t._startY-e.pageY)),t._maxSwipeHorizontalDistance=Math.max(t._maxSwipeHorizontalDistance,Math.abs(t._startX-e.pageX)),n=t.handleSwipeEvents(e)),n}touchEnd(e){return this.touchEndTime=new Date,this.handleUp(e)}pointerUp(e){return this.handleUp(e)}pointerCancel(e){this.pointerUp(e)}touchCancel(e){this.touchEnd(e)}mouseLeave(){this.isInBounds=!1}mouseMove(e){if(!this.isTouchMoved)return this.handleMove(e)}pointerMove(e){return this.handleMove(e)}touchMove(e){const t=this,n=e.touches,r=e.changedTouches,o=n&&n.length?n[0]:r&&r.length?r[0]:void 0;for(let n=0;n<t.inputEventProperties.length;n++){const r=t.inputEventProperties[n];void 0===e[r]&&(e[r]=o[r])}return t.isTouchMoved=!0,t.handleMove(e)}handleSwipeEvents(e){const t=this;let n=!0;return(t.handlers.swipetop||t.handlers.swipebottom)&&(n=this.handleVerticalSwipeEvents(e)),!1===n||(t.handlers.swipeleft||t.handlers.swiperight)&&(n=this.handleHorizontalSwipeEvents(e)),n}handleVerticalSwipeEvents(e){let t,n;return t=e.pageY,n=t-this._startY,this.swiped(e,n,"vertical")}handleHorizontalSwipeEvents(e){let t,n;return t=e.pageX,n=t-this._startX,this.swiped(e,n,"horizontal")}swiped(e,t,n){const r=this;if(n=n||0,Math.abs(t)>=r.swipeMin&&!r._swipeEvent&&!r._swipeLocked){let o=t<0?"swipeleft":"swiperight";if("horizontal"===n?r._swipeEvent=r.createEvent(e,o):(o=t<0?"swipetop":"swipebottom",r._swipeEvent=r.createEvent(e,t<0?"swipetop":"swipebottom")),r[o]&&(r[o](this._swipeEvent),Math.abs(t)<=this.swipeMax))return e.stopImmediatePropagation(),!1}return!0}resetSwipe(){this._swipeEvent=null,clearTimeout(this._swipeTimeout)}initSwipe(e){const t=this;t._maxSwipeVerticalDistance=0,t._maxSwipeHorizontalDistance=0,t._startX=e.pageX,t._startY=e.pageY,t._swipeLocked=!1,t._swipeEvent=null,t._swipeTimeout=setTimeout((function(){t._swipeLocked=!0}),t.swipeDelay)}}class m{get scrollWidth(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.max:-1}set scrollWidth(e){const t=this;e<0&&(e=0),t.horizontalScrollBar&&(t.horizontalScrollBar.max=e)}get scrollHeight(){const e=this;return e.verticalScrollBar?e.verticalScrollBar.max:-1}set scrollHeight(e){const t=this;e<0&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.max=e)}get scrollLeft(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.value:-1}set scrollLeft(e){const t=this;e<0&&(e=0),t.horizontalScrollBar&&(t.horizontalScrollBar.value=e)}get scrollTop(){const e=this;return e.verticalScrollBar?e.verticalScrollBar.value:-1}set scrollTop(e){const t=this;e<0&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.value=e)}get vScrollBar(){return this.verticalScrollBar}get hScrollBar(){return this.horizontalScrollBar}constructor(e,t,n){const r=this;r.container=e,r.horizontalScrollBar=t,r.verticalScrollBar=n,r.disableSwipeScroll=!1,r.listen()}listen(){const e=this,t=a.isMobile,n=e.horizontalScrollBar,r=e.verticalScrollBar;let o,i,s,l,d,c,u,p;e.inputEvents=new h(e.container);const m=function(e){return{amplitude:0,delta:0,initialValue:0,min:0,max:e.max,previousValue:0,pointerPosition:0,targetValue:0,scrollBar:e,value:0,velocity:0}},f=m(n),g=m(r),w=function(){const t=e.container.touchVelocityCoefficient||50;c=Date.now(),u=c-l,l=c;const n=function(e){e.delta=e.value-e.previousValue,e.previousValue=e.value;let n=t*e.delta/(1+u);e.velocity=.8*n+.2*e.velocity};n(g),n(f)},b=function(e){return p.value=e>p.max?p.max:e<p.min?p.min:e,p.scrollBar.value=p.value,e>p.max?"max":e<p.min?"min":"value"};function v(){let t,n;p.amplitude&&(e.container.$.fireEvent("kineticScroll"),t=Date.now()-l,n=-p.amplitude*Math.exp(-t/500),n>5||n<-5?(b(p.targetValue+n),cancelAnimationFrame(i),i=0,i=requestAnimationFrame(v)):b(p.targetValue))}let _;e.inputEvents.down((function(n){if(!t)return;const r=n.originalEvent.target,i=r&&r.closest?r.closest("smart-scroll-bar"):void 0;if(i===e.horizontalScrollBar||i===e.verticalScrollBar)return;s=!0,o=!1;const a=function(e,t){e.amplitude=0,e.pointerPosition=t,e.previousValue=e.value,e.value=e.scrollBar.value,e.initialValue=e.value,e.max=e.scrollBar.max};a(g,n.clientY),a(f,n.clientX),l=Date.now(),clearInterval(d),d=setInterval(w,500)})),e.inputEvents.up((function(){if(!s)return!0;if(clearInterval(d),e.disableSwipeScroll)return void(s=!1);const t=function(e){p=e,e.amplitude=.8*e.velocity,e.targetValue=Math.round(e.value+e.amplitude),l=Date.now(),cancelAnimationFrame(i),i=requestAnimationFrame(v),e.velocity=0};g.velocity>10||g.velocity<-10?t(g):(f.velocity>10||f.velocity<-10)&&t(f),s=!1})),e.inputEvents.move((function(t){if(!s)return!0;if(e.disableSwipeScroll)return;if(o&&(t.originalEvent.preventDefault(),t.originalEvent.stopPropagation()),f.visible=e.scrollWidth>0,g.visible=e.scrollHeight>0,!s||!f.visible&&!g.visible)return;const n=e.container.touchScrollRatio,r=e.container;let i,a;n&&("number"==typeof n?(i=-n,a=-n):"function"==typeof n&&(i=n(g.max,r.offsetHeight),a=n(f.max,r.offsetWidth))),g.ratio=i||-g.max/r.offsetHeight,g.delta=(t.clientY-g.pointerPosition)*g.ratio,f.ratio=a||-f.max/r.offsetWidth,f.delta=(t.clientX-f.pointerPosition)*f.ratio;let l="value";const d=function(t,n,r){return t.delta>5||t.delta<-5?(p=t,l=t.initialValue+t.delta>p.max?"max":t.initialValue+t.delta<p.min?"min":"value","min"===l&&0===t.initialValue||"max"===l&&t.initialValue===t.max||!t.visible||(e.container.$.fireEvent("kineticScroll"),b(t.initialValue+t.delta),w(),r.originalEvent.preventDefault(),r.originalEvent.stopPropagation(),o=!0,!1)):null};let c=d(g,t.clientY,t);if(null!==c)return c;{let e=d(f,t.clientX,t);if(null!==e)return e}})),e.scrollTo=function(t,n){const r=!1===n?f:g;let o=!1;l||(l=Date.now()),_||(_=Date.now()),Math.abs(Date.now()-_)>375?l=Date.now():o=!0,_=Date.now(),r.value=r.scrollBar.value,r.delta=t-r.value,r.max=r.scrollBar.max,t<=r.min&&(t=r.min),t>=r.max&&(t=r.max),r.targetValue=t;const s=t;let a=r.value;r.velocity=100*r.delta/(1+r.max),r.from=a;const d=function(e){return r.value=e>r.max?r.max:e<r.min?r.min:e,r.scrollBar.value=r.value,e>r.max?"max":e<r.min?"min":"value"},c=function(){let n,u=Date.now()-_,p=Math.min(1e3,Date.now()-l),h=r.velocity*Math.exp(p/175);if(o)(h<0&&r.value<=t||h>0&&r.value>=t)&&(h=0),(r.value+h<=r.min||r.value+h>=r.max)&&(h=0),h>.5||h<-.5?(d(r.value+h),cancelAnimationFrame(i),i=0,i=requestAnimationFrame(c)):d(r.targetValue);else{if(u>=175)return cancelAnimationFrame(i),e.container.$.fireEvent("kineticScroll"),void(i=0);n=y.Animation.Easings.easeInSine(u,a,s-a,175),d(n),cancelAnimationFrame(i),i=0,i=requestAnimationFrame(c)}};cancelAnimationFrame(i),i=requestAnimationFrame(c)},e.inputEvents.listen()}unlisten(){const e=this;e.inputEvents&&e.inputEvents.unlisten(),delete e.inputEvents}}class f{constructor(e){this.events={},this.handlers={},this.element=e}hasClass(e){const t=this,n=e.split(" ");for(let e=0;e<n.length;e++)if(!t.element.classList.contains(n[e]))return!1;return!0}addClass(e){const t=this;if(t.hasClass(e))return;const n=e.split(" ");for(let e=0;e<n.length;e++)t.element.classList.add(n[e]);t.isNativeElement||d.observeElement(t.element)}removeClass(e){const t=this;if(0===arguments.length)return void t.element.removeAttribute("class");const n=e.split(" ");for(let e=0;e<n.length;e++)t.element.classList.remove(n[e]);""===t.element.className&&t.element.removeAttribute("class"),t.isNativeElement||d.observeElement(t.element)}get isCustomElement(){const e=this;return!!e.element.tagName.startsWith(n)||e.element instanceof window[n].BaseElement==1||"DIV"!==e.element.tagName&&"SPAN"!==e.element.tagName&&"BUTTON"!==e.element.tagName&&"INPUT"!==e.element.tagName&&"UL"!==e.element.tagName&&"LI"!==e.element.tagName&&document.createElement(e.element.nodeName)instanceof window[n].BaseElement==1}get isNativeElement(){return!this.isCustomElement}dispatch(e){const t=this,n=t.events[e.type];let r=!1;if(n.length>1)for(let e=0;e<n.length;e++){const t=n[e];if(t.namespace&&t.namespace.indexOf("_")>=0){r=!0;break}}r&&n.sort((function(e,t){let n=e.namespace,r=t.namespace;return n=-1===n.indexOf("_")?0:parseInt(n.substring(n.indexOf("_")+1)),r=-1===r.indexOf("_")?0:parseInt(r.substring(r.indexOf("_")+1)),n<r?-1:n>r?1:0}));for(let r=0;r<n.length;r++){const o=n[r];if(e.namespace=o.namespace,e.context=o.context,e.defaultPrevented)break;const i=o.handler.apply(t.element,[e]);if(void 0!==i&&(e.result=i,!1===i)){e.preventDefault(),e.stopPropagation();break}}return e.result}fireEvent(e,t,n){const r=this;n||(n={bubbles:!0,cancelable:!0,composed:null!==r.element.getRootNode().host}),n.detail=t||{};const o=new CustomEvent(e,n);return o.originalStopPropagation=o.stopPropagation,o.stopPropagation=function(){return o.isPropagationStopped=!0,o.originalStopPropagation()},r.dispatchEvent(o),o}get isPassiveSupported(){const e=this;if(void 0!==e.supportsPassive)return e.supportsPassive;e.supportsPassive=!1;try{let t=Object.defineProperty({},"passive",{get:function(){e.supportsPassive=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e.supportsPassive}dispatchEvent(e){const t=this,n=e.type,r=t.element.context,o=n.substring(0,1).toUpperCase()+n.substring(1);t.element.context=document,t.element["on"+o]?t.element["on"+o](e):t.element["on"+n.toLowerCase()]?t.element["on"+n.toLowerCase()](e):t.element.dispatchEvent(e),t.element.context=r}listen(e,t){const n=this,r=e.split("."),o=r.slice(1).join("."),i=r[0];n.events[i]||(n.events[i]=[]);const s={type:i,handler:t,context:n.element,namespace:o};p.indexOf(i)>=0&&(n.inputEvents||(n.inputEvents=new h(n.element)),n.inputEvents[i]((function(e){n.dispatchEvent(e)})),n.inputEvents.boundEventTypes.push(i),n.inputEvents.listen(i)),0===n.events[i].length&&(n.handlers[i]=n.dispatch.bind(n),"wheel"===i?n.element.addEventListener("wheel",n.handlers[i],!!n.isPassiveSupported&&{passive:!1}):"touchmove"===i||"touchstart"===i||"touchend"===i?n.element.addEventListener(i,n.handlers[i],!!n.isPassiveSupported&&{passive:!1}):n.element.addEventListener(i,n.handlers[i],!1)),n.events[i].push(s)}unlisten(e){const t=this,n=e.split("."),r=n.slice(1).join("."),o=n[0];let i=t.events[o];if(t.inputEvents&&t.inputEvents.boundEventTypes.indexOf(o)>=0&&(t.inputEvents.boundEventTypes.splice(t.inputEvents.boundEventTypes.indexOf(o),1),0===t.inputEvents.boundEventTypes.length&&t.inputEvents.unlisten(o)),i){for(let e=0;e<i.length;e++){if(""!==r){let e=i.findIndex((e=>e.namespace===r));i.splice(e,1);break}i=[]}0===i.length&&(t.element.removeEventListener(o,t.handlers[o]),t.events[o]=[],delete t.handlers[o])}}getAttributeValue(e,t){const n=this,r=n.element.getAttribute(e);if(n.isNativeElement)return n.deserialize(r,t);const o=n.element.propertyByAttributeName[e];return void 0===o.deserialize?n.deserialize(r,t,o.nullable):n.element[o.deserialize](r)}setAttributeValue(e,t,n){const r=this;let o,i=!1;if(r.isNativeElement){if(o=r.serialize(t,n),"boolean"===n&&["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(e)>=0)return void(t?r.element.setAttribute(e,""):r.element.removeAttribute(e))}else{const s=r.element.propertyByAttributeName[e];i=!s||s.nullable,o=s&&s.serialize?r.element[s.serialize](t):r.serialize(t,n,i)}"array"!==n&&"object"!==n||"[]"!==o&&"{}"!==o?void 0===o?(r.element.removeAttribute(e),r.element.shadowRoot&&r.element.$.root&&r.element.$.root.removeAttribute(e)):(r.element.setAttribute(e,o),r.element.shadowRoot&&r.element.$.root&&r.element.$.root.setAttribute(e,o)):r.element.removeAttribute(e)}serialize(e,t,n){if(void 0===t&&(t=y.Types.getType(e)),void 0!==e&&(n||null!==e)){if(n&&null===e)return"null";if("string"===t)return e;if("boolean"===t||"bool"===t){if(!0===e||"true"===e||1===e||"1"===e)return"";if(!1===e||"false"===e||0===e||"0"===e)return}return"array"===t?JSON.stringify(e):["string","number","int","integer","float","date","any","function"].indexOf(t)>=0?e.toString():"object"===t?JSON.stringify(e):void 0}}deserialize(e,t,n){const r="null"===e;if(void 0!==e&&(!r||n)){if(r&&n)return null;if("boolean"===t||"bool"===t)return null!==e;if("number"===t||"float"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:parseFloat(e);if("int"===t||"integer"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:parseInt(e);if("string"===t)return e;if("any"===t)return e;if("date"===t)return new Date(e);if("function"===t){if("function"==typeof window[e])return window[e]}else if("array"===t||"object"===t)try{const t=JSON.parse(e);if(t)return t}catch(n){if(window[e]&&"object"==typeof window[e])return window[e];if("array"===t&&e.indexOf("[")>=0){if(e.indexOf("{")>=0){let t=e.replace(/{/gi,"").replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim();t=t.split("},");for(let e=0;e<t.length;e++){let n={},r=t[e].trim().split(",");for(let e=0;e<r.length;e++){const t=r[e].split(":")[0].trim(),o=r[e].split(":")[1].trim();n[t]=o}t[e]=n}return t}return e.replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim().split(",")}}}}}class g{static get Ripple(){return i}static get Easings(){return s}}class y{static get Types(){return o}static get Core(){return a}static get Animation(){return g}static get Scroll(){return m}static get InputEvents(){return h}static Extend(e){return new f(e)}static Assign(e,t){if(e.indexOf(".")>=0){const n=e.split(".");return y[n[0]]||(y[n[0]]={}),void(y[n[0]][n[1]]=t)}y[e]=t}}const w=y.Extend(document);let b=null;document.addEventListener("click",(()=>{d.start(),b&&clearTimeout(b),b=setTimeout((()=>{d.stop()}),1e4)})),document.addEventListener("mouseenter",(()=>{d.start()})),document.addEventListener("mouseleave",(()=>{d.stop()}));class v{}v.cache={};class _ extends HTMLElement{static get properties(){return{animation:{value:"advanced",type:"string",allowedValues:["none","simple","advanced"]},unfocusable:{value:!1,type:"boolean"},disabled:{value:!1,type:"boolean"},dataContext:{value:null,reflectToAttribute:!1,type:"any"},debugMode:{value:!0,type:"boolean",reflectToAttribute:!1},locale:{value:"en",type:"string",reflectToAttribute:!1},localizeFormatFunction:{value:null,type:"any",reflectToAttribute:!1},messages:{value:{en:{propertyUnknownName:"Invalid property name: '{{name}}'!",propertyUnknownType:"'{{name}}' property is with undefined 'type' member!",propertyInvalidValue:"Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!",propertyInvalidValueType:"Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",methodInvalidValueType:"Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!",methodInvalidArgumentsCount:"Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!",methodInvalidReturnType:"Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",elementNotInDOM:"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",moduleUndefined:"Module is undefined.",missingReference:"{{elementType}}: Missing reference to '{{files}}'.",htmlTemplateNotSuported:"{{elementType}}: Web Browser doesn't support HTMLTemplate elements.",invalidTemplate:"{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM."}},reflectToAttribute:!1,inherit:!0,type:"object"},props:{value:null,reflectToAttribute:!1,isHierarchicalProperty:!0,type:"any"},readonly:{value:!1,type:"boolean"},renderMode:{value:"auto",type:"string",reflectToAttribute:!1,allowedValues:["auto","manual"]},rightToLeft:{value:!1,type:"boolean"},rethrowError:{value:!0,type:"boolean",reflectToAttribute:!1},theme:{value:window[n].Theme,type:"string"},visibility:{value:"visible",allowedValues:["visible","collapsed","hidden"],type:"string"},wait:{value:!1,type:"boolean"}}}getBindings(e,t){const n=this;let r=0,o={},i=(e=>{if(e instanceof HTMLElement)return n.parseAttributes(e);{let t=n.parseProperty(e.data?e.data.trim():null,"textContent",e);if(t)return n&&e.parentNode===n.$.content&&(t.value=""!==n.$.html?n.$.html:void 0,n.innerHTML=""),{textContent:t}}})(e);i&&(o.data=i),t||(o.mapping=[],t=o),e.getAttribute&&(o.nodeId=e.getAttribute("smart-id"),t&&i&&(t.mapping[o.nodeId]=i)),o.node=e,e.firstChild&&(o.children={});for(let i=e.firstChild;i;i=i.nextSibling)o.children[r++]=n.getBindings(i,t);return o}_addRemovePropertyBinding(e,t,n,r,o){if(!e||!t||!n)return;const i=this,s=i.bindings,a=n.getAttribute("smart-id"),l=e.indexOf("{{")>=0;let d=!1;(e=e.replace("{{","").replace("}}","").replace("[[","").replace("]]","")).indexOf("!")>=0&&(e=e.replace("!",""),d=!0);const c=i._properties[e],u={name:e,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:d};if(o&&!r){const n={},r={name:e,targetPropertyName:t,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:d};n[e]=r,s.mapping[a]=n}const p=function(e){for(let o in e){const s=e[o];if(s.nodeId===a){s.data||(s.data={}),r?(s.data[t]=null,delete s.data[t]):s.data[t]=u;break}if(s.children)p(s.children);else if(s.node&&s.node.children&&s.node===n.parentElement){const e=s.node;if(!e.firstChild)continue;s.children={};let t=0;for(let n=e.firstChild;n;n=n.nextSibling)s.children[t++]=i.getBindings(n);p(s.children)}}};p(s.children),r?delete i.boundProperties[e]:i.boundProperties[e]=!0,i.updateBoundNodes(e)}addPropertyBinding(e,t,n,r){this._addRemovePropertyBinding(e,t,n,!1,r)}removePropertyBinding(e,t,n,r){this._addRemovePropertyBinding(e,t,n,!0,r)}parseAttributes(e){const t=this;let n;for(let r=0;r<e.attributes.length;r++){const o=e.attributes[r],i=o.name,s=o.value;v.cache["toCamelCase"+i]||(v.cache["toCamelCase"+i]=y.Core.toCamelCase(i));const a=v.cache["toCamelCase"+i];if(i.indexOf("(")>=0){let r=i.substring(1,i.length-1);if(t&&!t.dataContext){t.templateListeners[e.getAttribute("smart-id")+"."+r]=s,e.removeAttribute(i);continue}{n||(n={});const e=s.substring(0,s.indexOf("("));n[a]={isEvent:!0,name:r,value:e};continue}}let l=t.parseProperty(s,i,e);l&&(n||(n={}),n[a]=l)}return n}parseProperty(e,t){if(!e||!e.length)return;const n=this;let r,o=e.length,i=0,s=0,a=0,l=!0;for(;s<o;){i=e.indexOf("{{",s);let t=e.indexOf("[[",s),n="}}";if(t>=0&&(i<0||t<i)&&(i=t,l=!1,n="]]"),a=i<0?-1:e.indexOf(n,i+2),a<0)return;r=r||{};let o=e.slice(i+2,a).trim();r.name=o,s=a+2}const d=r.name,c=n?n._properties[d]:null;return r.twoWay=l,r.ready=!1,n&&(d.indexOf("::")>=0?n.boundProperties[d.substring(0,d.indexOf("::"))]=!0:n.boundProperties[d]=!0),c?(r.type=c.type,r.reflectToAttribute=c.reflectToAttribute):(["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(t)>=0?r.type="boolean":r.type="string",r.reflectToAttribute=!0),r}updateTextNodes(){const e=this;e.updateTextNode(e.shadowRoot||e,e.bindings,e)}updateTextNode(e,t,n){const r=this;if(!t)return;let o=0;for(let i=e.firstChild;i&&t.children;i=i.nextSibling)r.updateTextNode(i,t.children[o++],n);if(t&&t.data)for(let e in t.data){const r=t.data[e],o=r.name;"textContent"===e&&r.twoWay&&!r.updating&&void 0!==r.value&&(n[o]=r.value)}}updateBoundProperty(e,t){if(t.updating)return;const n=this;t.updating=!0,n[e]=t.value,t.updating=!1}updateBoundNodes(e){const t=this;if(t.updateBoundNode(t.shadowRoot||t,t.bindings,t,e),t.detachedChildren.length>0)for(let n=0;n<t.detachedChildren.length;n++){const r=t.detachedChildren[n],o=r.getAttribute("smart-id"),i=function(e){if(e.nodeId===o)return e;for(let t in e.children){const n=e.children[t];if((n.getAttribute?n.getAttribute("smart-id"):"")===o)return e;if(n.children){const e=i(n);if(e)return e}}return null},s=i(t.bindings);if(s)t.updateBoundNode(r,s,t,e,!0);else if(r.getAttribute&&t.bindings.mapping){const n=t,r=t.bindings;if(r)for(let o in r.mapping){const i=n.querySelector('[smart-id="'+o+'"]');if(i){const s=r.mapping[o];t.updateBoundData(i,s,n,e)}}}}}updateBoundMappedNodes(){const e=this,t=e.bindings,n=e;if(t.mapping)for(let r in t.mapping){let o=n.querySelector('[smart-id="'+r+'"]');if(n.shadowRoot&&(o=n.querySelector('[id="'+r+'"]'),o||(o=n.shadowRoot.querySelector('[id="'+r+'"]')||n.shadowRoot.querySelector('[smart-id="'+r+'"]'))),o){const i=t.mapping[r];e.updateBoundData(o,i,n)}else if(n.getAttribute("aria-controls")){let i=document.getElementById(n.getAttribute("aria-controls"));if(!i&&n.shadowRoot&&(i=n.shadowRoot.getElementById(n.getAttribute("aria-controls"))),o=i.querySelector('[smart-id="'+r+'"]'),o){const i=t.mapping[r];e.updateBoundData(o,i,n)}}}}updateBoundNode(e,t,n,r,o){const i=this;if(!t)return;let s=0;if(o){if(o&&!t.data)for(let a=e.firstChild;a&&t.children;a=a.nextSibling)if(a.getAttribute){const e=a.getAttribute("smart-id"),o=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();i.updateBoundNode(a,o,n,r),s++}else i.updateBoundNode(a,t.children[s++],n,r,o)}else for(let o=e.firstChild;o&&t.children;o=o.nextSibling)if(o.getAttribute){const e=o.getAttribute("smart-id"),a=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();i.updateBoundNode(o,a,n,r),s++}else i.updateBoundNode(o,t.children[s++],n,r);if(!t||!t.data)return;const a=t.data;i.updateBoundData(e,a,n,r)}updateBoundData(e,t,n,r){const o=this;for(let i in t){const s=t[i];let a=s.name;if(!s.updating&&(a.indexOf("::")>=0&&(a=a.substring(0,a.indexOf("::"))),void 0===r||r===a)){if(a.indexOf("(")>=0){let e=a.substring(a.indexOf("("));const t=a.substring(0,a.indexOf("("));if(e=e.substring(1,e.length-1),e=e.replace(/ /gi,""),e=e.split(","),e.length>0&&""!==e[0]){let r=[];for(let t=0;t<e.length;t++)r.push(n[e[t]]);s.value=n[t].apply(n,r)}else s.value=n[t]();s.type=typeof s.value}else s.value=n[a];if("innerHTML"===a){if(e[i].toString().trim()!==n[a].toString().trim()){if(window.smartBlazor&&e[i].indexOf("\x3c!--")>=0){(s.ready||n._properties[a].defaultValue!==s.value)&&(e[i]=s.value.toString());continue}(s.ready||n._properties[a].defaultValue!==s.value)&&(e[i]=s.value.toString().trim())}}else s.not?(e[i]=!s.value,s.targetPropertyName&&(e[s.targetPropertyName]=!s.value)):(e[i]=s.value,s.targetPropertyName&&(e[s.targetPropertyName]=s.value));if(e.$&&e.$.isNativeElement){v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const t=v.cache["toDash"+i],n=e.$.getAttributeValue(t,s.type);!s.reflectToAttribute||n===s.value&&s.ready||e.$.setAttributeValue(t,s.value,s.type),s.reflectToAttribute||e.$.setAttributeValue(t,null,s.type)}if(!s.ready){if(e.$&&e.$.isCustomElement){v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const t=v.cache["toDash"+i];e._properties||(e._beforeCreatedProperties=e._properties=e.propertyByAttributeName=[]),e._properties[i]||(e._properties[i]={attributeName:t},e._beforeCreatedProperties&&(e._beforeCreatedProperties[i]=e._properties[i]),e.propertyByAttributeName[t]=e._properties[i]);const n=e._properties[i];n.isUpdating=!0,s.reflectToAttribute&&(s.not?e.$.setAttributeValue(n.attributeName,!s.value,s.type):e.$.setAttributeValue(n.attributeName,s.value,s.type)),s.reflectToAttribute||e.$.setAttributeValue(n.attributeName,null,s.type),n.isUpdating=!1}if(s.twoWay){const t=function(t){if(s.value=t,e.$&&e.$.isNativeElement){v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const t=v.cache["toDash"+i],n=e.$.getAttributeValue(t,s.type);s.reflectToAttribute&&n!==s.value&&e.$.setAttributeValue(t,s.value,s.type),s.reflectToAttribute||e.$.setAttributeValue(t,null,s.type)}};if(s.name.indexOf("::")>=0){const n=s.name.indexOf("::"),r=s.name.substring(n+2);o["$"+e.getAttribute("smart-id")].listen(r,(function(){t(e[i]);const n=s.name.substring(0,s.name.indexOf("::"));o.updateBoundProperty(n,s)}))}if(e.$&&e.$.isCustomElement){e._properties[i]&&(e._properties[i].notify=!0),v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const n=v.cache["toDash"+i];o["$"+e.getAttribute("smart-id")].listen(n+"-changed",(function(e){let n=e.detail;t(n.value);const r=o.context;e.context!==document&&(o.context=o),o.updateBoundProperty(s.name,s),o.context=r}))}}}s.ready=!0}}}static clearCache(){this.cache={}}addMessages(e,t){Object.assign(this.messages[e],t)}localize(e,t){const n=this;if(!n.messages||!n.messages[n.locale])return;let r=n.messages[n.locale][e];if(""===r)return"";if(!r){const r=n.messages.en;if(r){let n=r[e];if(n){for(let e in t){let r=t[e];n=n.replace(new RegExp("{{"+e+"}}","g"),r)}return n}return e}}const o=r;for(let e in t){let n=t[e];r=r.replace(new RegExp("{{"+e+"}}","g"),n)}if(n.localizeFormatFunction){const i=n.localizeFormatFunction(o,r,t,e);if(void 0!==i)return i}return r}static get requires(){return{}}static get listeners(){return{"theme-changed":function(e){this.theme=e.detail.newValue}}}static get methods(){return{}}get classNamesMap(){return{animation:"smart-animate",rippleAnimation:"smart-ripple"}}get hasAnimation(){return"none"!==this.animation}get hasRippleAnimation(){return"none"!==this.animation&&"advanced"===this.animation}static get modules(){return window[n].Modules}get properties(){const e=this;return e._properties||(e._properties=[]),e._properties}get parents(){const e=this;let t=[],r=e.parentNode;for(;r&&9!==r.nodeType;)r instanceof HTMLElement==1&&t.push(r),r=r.parentNode;const o=e.getRootNode();if(o.host){const e=e=>{let t=[e],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==1&&t.push(n),n=n.parentNode;return t};t=t.concat(e(o.host))}return window[n].EnableShadowDOM&&e.isInShadowDOM&&e.shadowParent&&(t=t.concat(e.shadowParent.parents)),t}log(e){this._logger("log",e)}warn(e){this._logger("warn",e)}error(e){this._logger("error",e)}_logger(e,t){if(this.debugMode){const n=t instanceof Error?t.message:t.toString();console[e](n)}if(this.rethrowError&&"error"===e)throw t}get focused(){return this.contains(document.activeElement)}template(){return"<div></div>"}registered(){const e=this;e.onRegistered&&e.onRegistered()}created(){const e=this;e.isReady=!1,e._initElement(e),e._setModuleState("created"),e.onCreated&&e.onCreated()}completed(){const e=this;e.isCompleted=!0,e._onCompleted&&e._onCompleted(),e.onCompleted&&e.onCompleted()}whenReady(e){const t=this;t.isCompleted?e():(t.whenReadyCallbacks||(t.whenReadyCallbacks=[]),t.whenReadyCallbacks.push(e))}whenRendered(e){const t=this;t.isRendered?e():(t.whenRenderedCallbacks||(t.whenRenderedCallbacks=[]),t.whenRenderedCallbacks.push(e))}addThemeClass(){const e=this;""!==e.theme&&e.classList.add("smart-"+e.theme)}addDefaultClass(){const e=this;e.classList.add(n.toLowerCase()+"-element"),e.classList.add(e.nodeName.toLowerCase())}_renderShadowRoot(){const e=this;if(e.shadowRoot){e.$.root.classList.add(e.nodeName.toLowerCase());for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t];"class"===n.name||"id"===n.name||"style"===n.name||"tabindex"===n.name||n.name.indexOf("aria")>=0||e.$.root.setAttribute(n.name,n.value)}for(let t=0;t<e.classList.length;t++){const n=e.classList[t];"smart-element-init"!==n&&"smart-element"!==n&&"smart-hidden"!==n&&"smart-visibility-hidden"!==n&&e.$.root.classList.add(n)}}}render(){const e=this;if(!e.isRendered&&(e.isRendered=!0,e.isRendering=!1,e.context=document,e._renderShadowRoot(),e.whenRenderedCallbacks)){for(let t=0;t<e.whenRenderedCallbacks.length;t++)e.whenRenderedCallbacks[t]();e.whenRenderedCallbacks=[]}e.onRender&&e.onRender(),e.disabled&&e.setAttribute("aria-disabled",!0),e.readonly&&-1!==["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox"].indexOf(e.getAttribute("role"))&&e.setAttribute("aria-readonly",!0)}ready(){const e=this;if(e._setId(),e.addThemeClass(),e.addDefaultClass(),"collapsed"===e.visibility?e.classList.add("smart-hidden"):"hidden"===e.visibility&&e.classList.add("smart-visibility-hidden"),e.dataContext&&e.applyDataContext(),e.onReady&&e.onReady(),e.shadowRoot&&Smart(e._selector)){if(Smart(e._selector).styleUrls){const t=Smart(e._selector).styleUrls;for(let n=0;n<t.length;n++)e.importStyle(t[n])}if(Smart(e._selector).styles){const t=document.createElement("style");t.innerHTML=Smart(e._selector).styles,e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild)}}Smart(e._selector)&&Smart(e._selector).ready&&Smart(e._selector).ready()}_setId(){const e=this;if(!e.id){const t=e.elementName;e.id=t.slice(0,1).toLowerCase()+t.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}}checkLicense(){const e=this;"Evaluation"===window[n].License&&-1===window.location.hostname.indexOf("htmlelements")&&(e.logWatermark(),e.logLicense(),window[n].License="")}logWatermark(){const e=document.createElement("a");e.href="https://www.htmlelements.com/",e.innerHTML="https://www.htmlelements.com/",e.style.position="absolute",e.style.right="5px",e.style.bottom="5px",e.style.color="#fff",e.style.padding="20px",e.style.borderRadius="5px",e.style.background="#0C3D78",e.style.cursor="pointer",e.style.zIndex="999999",e.style.display="block",e.style.fontSize="24px",e.style.textDecoration="none",e.style.fontWeight="bold",e.style.opacity=0,e.style.transition="opacity .35s ease-in-out",e.id="watermark",document.getElementById("watermark")||setTimeout((()=>{document.getElementById("watermark")||(document.body.appendChild(e),setTimeout((()=>{e.style.opacity=1})),setTimeout((()=>{e.style.opacity=0,setTimeout((()=>{e.parentNode.removeChild(e)}),350)}),6e3))}),1e3)}logLicense(){console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("*jQWidgets License Key Not Found."),console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."),console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************")}get _selector(){const e=this;return e.id?"#"+e.id:e.classList.length>0?"."+e.classList[0]:""}applyDataContext(e){const t=this;let n="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext;if(e&&(n=e,t.dataContext=e),n){if(!n._uid){n._uid=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase(),n._properties=[];for(let e in n){const r=n[e];"function"!=typeof r&&"_properties"!==e&&"_uid"!==e&&(n._properties[e]=r,Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:()=>n._properties[e],set(r){const o=n._properties[e];n._properties[e]=r;let i=[];i[e]={oldValue:o,value:r},i.length++,t.updatingDataContext=!0,w.fireEvent("dataContextPropertyChanged",{dataContext:n,properties:i},{bubbles:!1,cancelable:!0}),t.updatingDataContext=!1}}))}}if(t.dataContextProperties=t.parseAttributes(t),t.dataContextPropertiesMap={},t.dataContextListeners={},t.dataContextProperties){t.updatingDataContext=!0;for(let e in t.dataContextProperties){const r=t.dataContextProperties[e],o=r.name;if(r.propertyName=e,t.dataContextPropertiesMap[o]=e,v.cache["toDash"+e]||(v.cache["toDash"+e]=y.Core.toDash(o)),r.isEvent){const e=r.value;t.dataContextListeners[o]&&t.removeEventListener(o,t.dataContextListeners[o]),t.dataContextListeners[o]=function(t){n[e](t)},t.addEventListener(o,t.dataContextListeners[o])}if(o.indexOf(".")>=0){const r=o.split(".");let i=n[r[0]];for(let e=1;e<r.length;e++)i=i[r[e]];void 0!==i&&(t[e]=i)}else t[e]=n[o]}t.dataContextPropertyChangedHandler=function(e){const n=e.detail.properties;if(e.detail.dataContext===("string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext))for(let e in n){const r=t.dataContextPropertiesMap[e],o=t.context;r&&(t.context=document,t[r]=n[e].value,t.context=o)}},w.listen("dataContextPropertyChanged",t.dataContextPropertyChangedHandler),t.updatingDataContext=!1}else t.dataContextProperties=null}else{t.dataContextProperties=null;const e=function(){("string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext)&&(t.applyDataContext(),window.removeEventListener("load",e))};window.addEventListener("load",e)}}updateDataContextProperty(e){const t=this,n="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext,r=t.dataContextProperties[e];if(!t.updatingDataContext&&r.twoWay){const o=r.name;if(o.indexOf(".")>=0){const r=o.split(".");let i=n[r[0]];for(let e=1;e<r.length;e++)i=i[r[e]];void 0!==i&&(i=t[e],c[n._uid]&&(c[n._uid][e]=i))}else n[o]=t[e],c[n._uid]&&(c[n._uid][e]=n[o])}}static get version(){return window[n].Version}initProperties(){const e=this;if(Smart(e._selector)&&Smart(e._selector).properties&&(e._initProperties=Smart(e._selector).properties),e.hasAttribute("props")&&!e.props?e._initProperties=window[e.getAttribute("props")]:e.props&&(e._initProperties=e.props),e._initProperties){const t=Object.keys(e._initProperties);for(let n=0;n<t.length;n++){const r=t[n],o=e._initProperties[r];if(void 0!==o){if(o.constructor===Smart.ObservableArray||o instanceof Smart.ObservableArray){e[r]=o.toArray();continue}if(o.constructor===Smart.DataAdapter||"smartDataAdapter"===o.constructor.name||"object"==typeof o&&Smart.DataAdapter&&o instanceof Smart.DataAdapter||o instanceof Smart.Observable||o.constructor===Smart.Observable||"object"!=typeof o||y.Types.isArray(o)||o instanceof Date){if(void 0===e[r]&&-1===["onReady","onAttached","onDetached","onCreated","onCompleted"].indexOf(r)){const t=e.localize("propertyUnknownName",{name:r});e.log(t)}e[r]=o;continue}}if("messages"!==r)if("dataSourceMap"!==r&&"rowCSSRules"!==r){if(o&&"object"==typeof o){const t=function(n,r){const o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i],a=n[s],l=e._properties[r+"_"+s];if(l&&null===l.value){if(void 0===e[r+"_"+s]){const t=e.localize("propertyUnknownName",{name:r+"_"+s});e.log(t)}e[r+"_"+s]=a}else if("object"==typeof a&&!y.Types.isArray(a)&&a&&a.constructor!==Date)t(a,r+"_"+s);else{if(void 0===e[r+"_"+s]){const t=e.localize("propertyUnknownName",{name:r+"_"+s});e.log(t)}e[r+"_"+s]=a}}};t(o,r)}}else e[r]=o;else e[r]=Object.assign(e[r],o)}}}setProperties(e){const t=this,n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r],i=e[o];if(i.constructor===Smart.ObservableArray||i instanceof Smart.ObservableArray)t[o]=i.toArray();else if(i.constructor===Smart.DataAdapter||"smartDataAdapter"===i.constructor.name||"object"==typeof i&&Smart.DataAdapter&&i instanceof Smart.DataAdapter||i instanceof Smart.Observable||i.constructor===Smart.Observable||"object"!=typeof i||y.Types.isArray(i)||i instanceof Date){if(void 0===t[o]&&-1===["onReady","onAttached","onDetached","onCreated","onCompleted"].indexOf(o))continue;const e=t._properties[o];"int"===e.type||"number"===e.type&&"string"==typeof subPropertyValue?"int"===e.type?t[o]=parseInt(i):t[o]=parseFloat(i):t[o]=i}else if("messages"!==o&&"dataSourceMap"!==o){if("object"==typeof i){const e=function(n,r){const o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i],a=n[s],l=t._properties[r+"_"+s];if(l&&null===l.value){if(void 0===t[r+"_"+s])continue;const e=t._properties[r+"_"+s];"int"===e.type||"number"===e.type&&"string"==typeof a?"int"===e.type?t[r+"_"+s]=parseInt(a):t[r+"_"+s]=parseFloat(a):t[r+"_"+s]=a}else if("object"==typeof a&&!y.Types.isArray(a)&&a&&a.constructor!==Date)e(a,r+"_"+s);else{if(void 0===t[r+"_"+s])continue;const e=t._properties[r+"_"+s];"int"===e.type||"number"===e.type&&"string"==typeof a?"int"===e.type?t[r+"_"+s]=parseInt(a):t[r+"_"+s]=parseFloat(a):t[r+"_"+s]=a}}};e(i,o)}}else t[o]=i}}setup(){const e=this;if(e.context=this,e.isReady&&!e.isCompleted)return;if(e.isReady)return e._setModuleState("attached"),e.isAttached=!0,e.attached(),e._handleListeners("listen"),void(e.context=document);e.ownerElement&&e.ownerElement.detachedChildren.indexOf(e)>=0&&e.ownerElement.detachedChildren.splice(e.ownerElement.detachedChildren.indexOf(e),1),e.isReady=!0,e.methods=e.getStaticMember("methods"),e.initProperties(),a.isMobile&&e.classList.add("smart-mobile");for(let t=0;t<e.attributes.length;t+=1){const n=e.propertyByAttributeName[e.attributes[t].name];if(!n)continue;let r=e.$.getAttributeValue(n.attributeName,n.type);const o=r?r.toString():"";if(!(o.indexOf("{{")>=0||o.indexOf("[[")>=0||"object"!==n.type&&"array"!==n.type&&(e.attributes[t].value.indexOf("{{")>=0||e.attributes[t].value.indexOf("[[")>=0)||void 0===r||n.value===r)){const o=y.Types.getType(r),i=e.attributes[t].value;if(("any"===n.type||"object"===n.type)&&""+e[n.name]===r)continue;if("array"===n.type&&e[n.name]&&JSON.stringify(e[n.name])===r)continue;if("number"===o&&isNaN(r)&&"NaN"!==i&&"Infinity"!==i&&"-Infinity"!==i){const t=e.localize("propertyInvalidValueType",{name:n.name,actualType:"string",type:n.type});e.log(t)}n.isUpdatingFromAttribute=!0,e[n.name]=r,n.isUpdatingFromAttribute=!1}}for(let t in e._properties){const n=e._properties[t];if("innerHTML"===t&&n.value===n.defaultValue&&(n.value=n.defaultValue=y.Core.html(e)),"boolean"!==n.type&&"bool"!==n.type||"false"===e.getAttribute(n.attributeName)&&(n.isUpdating=!0,e.setAttribute(n.attributeName,""),n.isUpdating=!1),n.defaultReflectToAttribute&&n.reflectToAttribute){if(n.defaultReflectToAttribute&&n.defaultReflectToAttributeConditions){let t=!0;for(let r=0;r<n.defaultReflectToAttributeConditions.length;r++){const o=n.defaultReflectToAttributeConditions[r];let i,s;for(let e in o)i=e,s=o[e];e._properties[i]&&e._properties[i].value!==s&&(t=!1)}if(!t)continue}n.isUpdating=!0,e.$.setAttributeValue(n.attributeName,n.value,n.type),n.isUpdating=!1}}const t=[];if(e.children.length>0)for(let n=0;n<e.children.length;n++){const r=e.children[n];y.Extend(r).isCustomElement&&t.push(r)}e.applyTemplate(),e.complete=function(){if(!e.templateBindingsReady){const t=e=>{e.templateBindingsReady||(e.templateBindingsReady=!0,e.updateTextNodes(),e.updateBoundNodes())};if(e.ownerElement){let n=e.ownerElement,r=[];for(;n;)r.push(n),n=n.ownerElement;for(let e=r.length-1;e>=0;e--)t(r[e]);t(e)}else t(e)}const t=()=>{if(e._setModuleState("ready"),e.ready(),"auto"!==e.renderMode||e.isRendered||e.render(),e.isAttached=!0,e._setModuleState("attached"),e.attached(),e._handleListeners("listen"),e.isHidden||0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0),e.completed(),e.isRendered&&(e.context=document),e.whenReadyCallbacks){for(let t=0;t<e.whenReadyCallbacks.length;t++)e.whenReadyCallbacks[t]();e.whenReadyCallbacks=[]}};if(e.wait)e.classList.add("smart-visibility-hidden");else if(e.classList.contains("smart-async"))requestAnimationFrame((()=>{t()}));else{const n=e.shadowParent;e.shadowParent=null;const r=e.parents;if(e.shadowParent=n,0===r.length)return;const o=()=>{let t=e.ownerElement,n=[];for(;t;)n.push(t),t=t.ownerElement;for(let e=n.length-1;e>=0;e--)n[e].updateBoundMappedNodes()};e.ownerElement&&"HTML"!==r[r.length-1].nodeName?e.getRootNode().host?t():e.ownerElement&&"HTML"===e.ownerElement.parents[e.ownerElement.parents.length-1].nodeName?(o(),t()):e.checkIsInDomInterval=setInterval((()=>{const n=e.parents;"HTML"===n[n.length-1].nodeName&&(clearInterval(e.checkIsInDomInterval),o(),t())}),100):t()}};let r=[].slice.call(e.querySelectorAll("[smart-id]")).concat(t);if(window[n].EnableShadowDOM&&!0!==e.isInShadowDOM&&(r=[].slice.call(e.shadowRoot.querySelectorAll("[smart-id]")).concat(t)),0===r.length)e.complete();else{e._completeListeners=0;for(let t=0;t<r.length;t++){const n=r[t];if(y.Extend(n).isCustomElement){const t=function(){e._completeListeners--,0===e._completeListeners&&(e.complete(),delete e._completeListeners)}.bind(e);n.isCompleted||n.isUtilityElement||!0===n.wait||(e._completeListeners++,n._onCompleted||(n.completeHandlers=[],n._onCompleted=function(){for(let e=0;e<n.completeHandlers.length;e++)n.completeHandlers[e]()}),n.completeHandlers.push(t))}}0===e._completeListeners&&e.complete()}}visibilityChangedHandler(){const e=this;e.isReady&&requestAnimationFrame((()=>{0===e.offsetWidth||0===e.offsetHeight?e.isHidden=!0:(e.isHidden=!1,e.$.fireEvent("resize",e,{bubbles:!1,cancelable:!0}))}))}attributeChangedCallback(e,t,n){const r=this,o=r.propertyByAttributeName[e];if("class"!==e&&"style"!==e||r.visibilityChangedHandler(),o||r.attributeChanged(e,t,n),r.onAttributeChanged&&r.onAttributeChanged(e,t,n),!o||o&&o.isUpdating)return;let i=r.$.getAttributeValue(o.attributeName,o.type);void 0!==n&&r[o.name]!==i&&(o.isUpdatingFromAttribute=!0,r[o.name]=void 0!==i?i:r._properties[o.name].defaultValue,o.isUpdatingFromAttribute=!1)}attributeChanged(e,t,n){}set hasStyleObserver(e){const t=this;void 0===t._hasStyleObserver&&(t._hasStyleObserver=e),e?d.watch(t):d.unwatch(t)}get hasStyleObserver(){const e=this;return void 0===e._hasStyleObserver||e._hasStyleObserver}attached(){const e=this;e.hasStyleObserver&&d.watch(e),e.onAttached&&e.onAttached(),Smart(e._selector)&&Smart(e._selector).attached&&Smart(e._selector).attached()}detached(){const e=this;e.hasStyleObserver&&d.unwatch(e),e._setModuleState("detached"),e.isAttached=!1,e.ownerElement&&-1===e.ownerElement.detachedChildren.indexOf(e)&&e.ownerElement.detachedChildren.push(e),e._handleListeners("unlisten"),e.onDetached&&e.onDetached(),Smart(e._selector)&&Smart(e._selector).detached&&Smart(e._selector).detached(),u&&u[e._selector]&&delete u[e._selector]}propertyChangedHandler(e,t,n){const r=this;t!==n&&("theme"===e&&(""!==t&&r.classList.remove("smart-"+t),""!==n&&r.classList.add("smart-"+n)),"visibility"===e?("collapsed"===t?r.classList.remove("smart-hidden"):"hidden"===t&&r.classList.remove("smart-visibility-hidden"),"collapsed"===n?r.classList.add("smart-hidden"):"hidden"===n&&r.classList.add("smart-visibility-hidden")):("disabled"===e||"readonly"===e)&&r._ariaPropertyChangedHandler(e,n),r.propertyChanged&&r.propertyChanged(e,t,n))}_ariaPropertyChangedHandler(e,t){const n=this;"readonly"===e&&-1===["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox"].indexOf(n.getAttribute("role"))||(t?n.setAttribute("aria-"+e,!0):n.removeAttribute("aria-"+e))}_handleListeners(e){const t=this,n=t.tagName.toLowerCase(),r=r=>{for(let o in r){const i=o.split(".");let s=i[0],a=t.$;if(i[1])if(s=i[1],a=t["$"+i[0]],"document"===i[0]){let e=t.smartId;""===e&&(e=y.Core.toCamelCase(n)),s=s+"."+e}else t.smartId&&(s=s+"."+t.smartId+"_"+t.parents.length);else t.smartId&&(s=s+"."+t.smartId);const l=r[o],d=function(e){const n=t.context;t.context=t,t[l]&&t[l].apply(t,[e]),t.context=n};a&&a[e](s,d)}};r(t.getStaticMember("listeners")),r(t.templateListeners),Smart(t._selector)&&Smart(t._selector).properties&&r(Smart(t._selector).listeners)}parseTemplate(){const e=this,n=e.template(),o=document.createDocumentFragment();if(t[e.nodeName]&&!r)return t[e.nodeName].cloneNode(!0);if(""===n)return null;let i=document.createElement("div");o.appendChild(i),i.innerHTML=n;let s=i.childNodes;i.parentNode.removeChild(i);for(let e=0;e<s.length;e++)o.appendChild(s[e]);return t[e.nodeName]=o,r?o:o.cloneNode(!0)}applyTemplate(){const e=this,t=e.parseTemplate();if(!t)return;if(!t.hasChildNodes)return;const n=t.childNodes[0],r=(t,n)=>{e["$"+t]=n.$=y.Extend(n),e.$[t]=n,n.ownerElement=e};let o=n;if(n.getElementsByTagName("content").length>0){let e=n.getElementsByTagName("content")[0];o=e.parentNode,o.removeChild(e)}else{const e=t.querySelectorAll("[inner-h-t-m-l]");e&&e.length>0&&(o=e[0])}e.$.template="template"===n.nodeName.toLowerCase()?n:n.querySelector("template");let i=t.querySelectorAll("[id]");0===i.length&&(i=t.querySelectorAll("*")),r("root",n),r("content",o),e.$.html=e.innerHTML.toString().trim();for(let t=0;t<i.length;t+=1){let n=i[t];""===n.id&&(n.id="child"+t),r(n.id,n),n.setAttribute("smart-id",n.id),e.shadowRoot?n.shadowParent=e:n.removeAttribute("id")}for(!1!==e.hasTemplateBindings?e.bindings=e.getBindings(t):e.bindings=[],e.$root.addClass("smart-container");e.childNodes.length;)o.appendChild(e.firstChild);if(e.appendTemplate(t),e.$.template){const t=document.createElement("div");t.classList.add("smart-template-container"),e.$.templateContainer=t,e.$.template.parentNode.insertBefore(t,e.$.template),e.refreshTemplate()}}refreshTemplate(){const e=this;if(!e.$.templateContainer)return;e.templateDetached(e.$.templateContainer);const t=e.$.template.content.cloneNode(!0);e.templateBindings=e.getBindings(t),e.templateProperties=[];let n=document.createDocumentFragment();const r=function(t,n,o){for(let i in t){const s=t[i],a=s.node.cloneNode();n.appendChild(a);let l=[],d=!1;if(s.data)for(let t in s.data){const r=s.data[t],i=r.name;if(e.templateProperties[i]=!0,a.removeAttribute(y.Core.toDash(t)),"*items"===t)l=e[i],d=!0;else if(i.indexOf("item.")>=0&&void 0!==o)r.value=o[i.substring("item.".length)],a[t]=r.value;else if(i.indexOf("item")>=0&&void 0!==o)r.value=o,a[t]=r.value;else if("*if"===t)if(i.indexOf("(")>=0){let t,r=i.substring(i.indexOf("("));const o=i.substring(0,i.indexOf("("));if(r=r.substring(1,r.length-1),r=r.replace(/ /gi,""),r=r.split(","),r.length>0&&""!==r[0]){let n=[];for(let t=0;t<r.length;t++)n.push(e[r[t]]);t=e[o].apply(e,n)}else t=e[o]();!1===t&&n.removeChild(a)}else e[i]||n.removeChild(a);else e.updateBoundNode(a,s,e,i)}if(l.length>0||d){for(let e=0;e<l.length;e++)s.children&&r(s.children,a,l[e]);if("number"==typeof l)for(let e=0;e<l;e++)s.children&&r(s.children,a,e)}else s.children&&r(s.children,a,o)}};r(e.templateBindings.children,n),e.$.templateContainer.innerHTML="",e.$.templateContainer.appendChild(n),e.templateAttached(e.$.templateContainer)}templateAttached(){}templateDetached(){}appendTemplate(e){this.appendChild(e)}defineElementModules(){const e=this,t=e.constructor.prototype;if("BaseElement"===t.elementName){t.modules=e.constructor.modules;const n=t.modules;for(let t=0;t<n.length;t+=1)e.addModule(n[t])}else{const n=t.modules;if(!n)return;for(let t=0;t<n.length;t+=1){const r=n[t],o=r.prototype;e.defineElementMethods(o.methodNames,o),e.defineElementProperties(r.properties)}}}watch(e,t){const n=this;n._watch=null!==e&&null!==t?{properties:e,propertyChangedCallback:t}:null}unwatch(){this._watch=null}set(e,t,n){const r=this,o=r.context;r.context=!0===n?document:r,r[e]=t,r.context=o}get(e){return this[e]}_setModuleState(e,t){const n=this,r="is"+e.substring(0,1).toUpperCase()+e.substring(1),o="on"+e.substring(0,1).toUpperCase()+e.substring(1);for(let i=0;i<n.modulesList.length;i++){const s=n.modulesList[i];s[r]=!0,s[e]&&s[e](t),s[o]&&s[o](t)}}addModule(e,t){const n=this;if(!e)return;const r=n.modules.slice(0),o=e.prototype,i=Object.getPrototypeOf(e);if(i.name&&i.name!==e.name&&n.addModule(i),!e.moduleName&&e.name&&(e.moduleName=e.name),-1===r.findIndex((t=>e.moduleName===t.moduleName))&&r.push(e),n.defineModule(e),n.defineElementMethods(o.methodNames,o),n.defineElementProperties(e.properties),n.constructor.prototype.modules=r,t)for(let t in Smart.Elements.tagNames){const r=Smart.Elements.tagNames[t];let o=Object.getPrototypeOf(r),i=[];for(;o!==HTMLElement;)i.push(o.prototype),o=Object.getPrototypeOf(o);i.indexOf(n)>=0&&r!==n&&r.prototype.addModule(e)}}defineModule(e){if(e.isDefined)return;e.prototype._initModule=function(e){this.ownerElement=e};const t=e.properties||{},n=Object.keys(t),r=Object.getOwnPropertyNames(e.prototype);e.prototype.methodNames=r;for(let r=0;r<n.length;r+=1){const o=n[r],i=t[o];Object.defineProperty(e.prototype,o,{configurable:!1,enumerable:!0,get(){return this.ownerElement?this.ownerElement[o]:i.value},set(e){this.ownerElement[o]=e}})}e.isDefined=!0}getStaticMember(e,t){const r=window[n][this.elementName],o=r[e];t||(t="");let i="array"===t?[]:"string"===t?"":{},s=Object.getPrototypeOf(r),a=[];for(;s[e];)a.push(s[e]),s=Object.getPrototypeOf(s);for(let e=a.length-1;e>=0;e--)if("array"===t)for(let t=0;t<a[e].length;t++)-1===i.indexOf(a[e][t])&&i.push(a[e][t]);else"string"===t?-1===i.indexOf(a[e])&&(i+=a[e]):i=y.Core.assign(i,a[e]);if("array"===t){for(let e=0;e<o.length;e++)-1===i.indexOf(o[e])&&i.push(o[e]);return i}return"string"===t?(-1===i.indexOf(o)&&(i+=o),i):y.Core.assign(i,o)}defineElementHierarchicalProperties(e,t){const n=this,r=[];!function(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const i=n[o];if("messages"===i)continue;const s=e[i],a=Object.keys(s),l=a.indexOf("value")>=0&&a.indexOf("type")>=0&&"object"==typeof s.value;if("propertyObject"===s.type||l){const e=function(n,o){if(!n.value)return;const i=Object.keys(n.value);for(let s=0;s<i.length;s++){const a=i[s],l=n.value[a],d=o+"_"+a;if("object"!=typeof l||null===l)break;const c=Object.keys(l);if(!(c.indexOf("value")>=0&&c.indexOf("type")>=0))break;if("array"!==n.type&&(n.isHierarchicalProperty=!0),l.parentPropertyName=o,t){const e=t._properties[d];if(n.value.hasOwnProperty(a)){if(e.isDefined)continue;delete n.value[a]}e.isDefined=!0,Object.defineProperty(n.value,a,{configurable:!1,enumerable:!0,get:()=>t._properties[d].value,set(e){t.updateProperty(t,t._properties[d],e)}})}r[d]||(r[d]=l,r.length++),("propertyObject"===l.type||"object"==typeof l.value&&"array"!==l.type)&&e(t?t._properties[d]:l,d)}};e(s,i)}}}(e),r.length>0&&!t&&n.defineElementProperties(r)}defineElement(){const e=this,t=e.constructor.prototype,n=e.getStaticMember("properties"),r=Object.getOwnPropertyNames(t);t.extendedProperties={},t.boundProperties={},t.templateListeners={},e.defineElementModules(),e.defineElementMethods(r,t),e.defineElementProperties(n),e.defineElementHierarchicalProperties(e.extendedProperties),t._initElement=function(){const e=this,n=t.extendedProperties,r=Object.keys(n),o=e.modules;e.$=y.Extend(e),e.$document=w,e.smartId=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase(),e.isCreated||(e.modulesList=[],e._properties=[],e._beforeCreatedProperties&&(e._properties=e._beforeCreatedProperties,delete e._beforeCreatedProperties),e.detachedChildren=[],e.propertyByAttributeName=[]);for(let t=0;t<o.length;t+=1){let n=new(0,o[t]);n._initModule(e),e.modulesList.push(n)}for(let t=0;t<r.length;t+=1){const o=r[t],i=n[o];let s=i.value;if(e._properties[o]){if(void 0!==e._properties[o].notify)continue;delete e._properties[o]}if(E&&"innerHTML"===o&&delete e[o],-1===window.navigator.userAgent.indexOf("PhantomJS")&&e.hasOwnProperty(o)&&(s=e[o],delete e[o]),"array"===i.type&&null!=s&&(s=s.slice(0)),"object"===i.type&&null!=s&&(s=Array.isArray(s)?s.slice(0):Object.assign({},s)),e._properties[o]={name:o,notify:i.notify,allowedValues:i.allowedValues,type:i.type,nullable:i.nullable,reflectToAttribute:i.reflectToAttribute,defaultReflectToAttribute:i.defaultReflectToAttribute,defaultReflectToAttributeConditions:i.defaultReflectToAttributeConditions,value:s,readOnly:i.readOnly,defaultValue:s,attributeName:i.attributeName,observer:i.observer,inherit:i.inherit,extend:i.extend,validator:i.validator},e.propertyByAttributeName[i.attributeName]=e._properties[o],!i.hasOwnProperty("type")){const t=e.localize("propertyUnknownType",{name:o});e.log(t)}if("any"===i.type||"propertyObject"===i.type)continue;const a=y.Types.getType(s);if(null!=s&&i.type!==a&&!i.validator){if("object"===i.type&&"array"===a)continue;if("number"===a&&["integer","int","float"].findIndex((e=>e===i.type))>=0)continue;const t=e.localize("propertyInvalidValueType",{name:o,actualType:a,type:i.type});e.log(t)}}e.defineElementHierarchicalProperties(e._properties,e),e.isCreated=!0},t.registered()}defineElementMethods(e,t){const n=this.constructor.prototype,r=function(e,t){const n=Array.prototype.slice.call(arguments,2),r=function(){if(!this.isReady&&"localize"!==t&&"localize"!==t&&"cloneNode"!==t&&"importStyle"!==t&&"log"!==t&&"parseAttributes"!==t){const e=this.localize("elementNotInDOM");this.log(e)}let r=this;for(let e=0;e<this.modulesList.length;e++){let n=this.modulesList[e];if(t in n){r=n;break}}const o=this.context,i=n.concat(Array.prototype.slice.call(arguments));let s=null;const a=function(e,t){return e===t||"number"===e&&("int"===t||"integer"===t||"float"===t)||"bool"===e&&"boolean"===t||"boolean"===e&&"bool"===t||"object"===e&&"any"===t||void 0};if(this.methods){const e=this.methods[t];if(e){const n=e.split(":");s=n[n.length-1].trim();const r=[],o=e.substring(1+e.indexOf("("),e.lastIndexOf(")")).split(",");let l="";for(let e=0;e<o.length;e++){const t=o[e];l+=t,t.indexOf(":")>=0?(r.push(l),l=""):l+=","}let d=r.length;for(let e=0;e<r.length;e++){const n=r[e].trim().split(":"),o=n[0].split("=")[0].trim().indexOf("?")>=0,s=n[1].indexOf("?")>=0,l=n[1].replace(/\?/gi,"").trim(),c=l.split("|");let u=n[0].split("=")[1];const p=y.Types.getType(i[e]);if(void 0===i[e]&&u){switch(u=u.trim(),l[0]){case"date":{let e=u.substring(u.indexOf("(")+1,u.lastIndexOf(")"));e=e.length>0?e.split(",").map((e=>parseInt(e))):[],u=0===e.length?new Date:new Date(e[0],e[1],e[2]);break}case"bool":case"boolean":u="true"===u||"1"===u;break;case"int":case"integer":u=parseInt(u);break;case"float":case"number":u=parseFloat(u);break;case"any":case"object":u=u.indexOf("{")>=0?JSON.parse(u):u}i.push(u)}else o&&d--;if(l!==p&&p){let n=!0;for(let e=0;e<c.length;e++)if(a(p,c[e])){n=!1;break}if(n&&(null!==i[e]||!s)){const n=this.localize("methodInvalidValueType",{name:t,actualType:p,type:l,argumentIndex:e});this.log(n)}}if(i.length<d){const e=this.localize("methodInvalidArgumentsCount",{name:t,actualArgumentsCount:i.length,argumentsCount:d});this.log(e)}}}}this.context=this;const l=e.apply(r,i);if(s){const e=void 0===y.Types.getType(l)?"void":y.Types.getType(l);if(!a(e,s)){const n=this.localize("methodInvalidReturnType",{name:t,actualType:e,type:s});this.log(n)}}return this.context=o,l};return r},o=["constructor","ready","created","render","attached","detached","appendChild","insertBefore","removeChild","connect","disconnectedCallback","connectedCallback","attributeChangedCallback","propertyChangedHandler","enableShadowDOM","isInShadowDOM","addPropertyBindings"];for(let i in e){let s=e[i];s&&s.startsWith&&s.startsWith("_")||void 0!==o.find((e=>e===s))||n.extendedProperties[s]||y.Types.isFunction(t[s])&&(n[s]=r(t[s],s))}}defineElementProperties(e){if(!e)return;const t=this,n=t.constructor.prototype,r=Object.keys(e),o=t.getStaticMember("properties");Object.assign(n.extendedProperties,e),t.updateProperty=function(e,t,n){const r=e;if(!t||t.readOnly)return;if(t.allowedValues){let e=!1;for(let r=0;r<t.allowedValues.length;r++)if(t.allowedValues[r]===n){e=!0;break}if(!e){const e=JSON.stringify(t.allowedValues).replace(/\[|\]/gi,"").replace(",",", ").replace(/"/gi,"'"),o="'"+n+"'",i=r.localize("propertyInvalidValue",{name:t.name,actualValue:o,value:e});return void r.log(i)}}const o=t.name,i=r._properties[o].value;if(t.validator&&r[t.validator]){const e=r.context;r.context=r;const o=r[t.validator](i,n);void 0!==o&&(n=o),r.context=e}if(i!==n){if(r.propertyChanging){const e=r.propertyChanging(o,i,n);if(!1===e||null===e)return}if(!t.hasOwnProperty("type")){const e=r.localize("propertyUnknownType",{name:o});r.log(e)}if("array"!==t.type||JSON.stringify(i)!==JSON.stringify(n)){if(null!=n&&"any"!==t.type&&"propertyObject"!==t.type&&t.type!==y.Types.getType(n)&&!t.validator||null===n&&!t.nullable){let e=!0;if("object"===t.type&&"array"===y.Types.getType(n)&&(e=!1),"number"===y.Types.getType(n)&&["integer","int","float"].findIndex((e=>e===t.type))>=0&&(e=!1),e){const e=r.localize("propertyInvalidValueType",{name:o,actualType:y.Types.getType(n),type:t.type});return void r.error(e)}}if(t.isUpdating=!0,t.isHierarchicalProperty){const e=function(t,n){if(!t)return;const o=Object.keys(t);for(let i=0;i<o.length;i++){const s=o[i],a=t[s];"object"==typeof a&&!y.Types.isArray(a)&&a&&a.constructor!==Date?e(a,n+"_"+s):r[n+"_"+s]=a}};e(n,o)}else r._properties[o].value=n;if(!t.isUpdatingFromAttribute&&t.reflectToAttribute&&r.$.setAttributeValue(t.attributeName,n,t.type),r.isReady&&(!r.ownerElement||r.ownerElement&&r.ownerElement.isReady)){if("wait"===o&&(n||!i||r.isCompleted||(r.classList.remove("smart-visibility-hidden"),r.ownerElement&&r.ownerElement.updateBoundMappedNodes(),r.updateBoundMappedNodes(),r.complete())),"renderMode"===o)return;if(r.context!==r&&!r.wait){const e=r.context;r.context=r,r.propertyChangedHandler(o,i,n),r.context=e,t.observer&&r[t.observer]&&(r.context=r,r[t.observer](i,n),r.context=document),r._watch&&r._watch.properties.indexOf(o)>=0&&r._watch.propertyChangedCallback(o,i,n)}const e=t.notify||r.boundProperties[o];e&&(r.$.fireEvent(t.attributeName+"-changed",{context:r.context,oldValue:i,value:r[o]}),r.boundProperties[o]&&r.updateBoundNodes(o)),e&&r.templateProperties&&r.templateProperties[o]&&r.refreshTemplate(),r.dataContextProperties&&("dataContext"===o?r.applyDataContext():r.dataContextProperties[o]&&r.updateDataContextProperty(o))}t.isUpdating=!1}}};for(let t=0;t<r.length;t+=1){const i=r[t],s=e[i],a=y.Core.toDash(i),l=s.type||"any",d=l.indexOf("?")>=0||"any"===l;d&&"any"!==l&&(s.type=l.substring(0,l.length-1)),s.nullable=d,s.attributeName=a.toLowerCase(),s.name=i,s.reflectToAttribute=void 0===s.reflectToAttribute||s.reflectToAttribute,s.inherit&&o[i]&&(s.value=o[i].value),s.extend&&o[i]&&y.Core.assign(s.value,o[i].value),n.hasOwnProperty(i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get(){if(this._properties[i])return this._properties[i].value},set(e){const t=this;t.updateProperty(t,t._properties[i],e)}})}}}let C=[],S=[],x=[],E=!1;const A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);A&&parseInt(A[2],10)<=50&&(E=!0);class T{static register(e,t){const r=t.prototype;let o=a.toCamelCase(e).replace(/[a-z]+/,""),i=t.version||window[n].Version;if(window.customElements.get(e)&&window.customElements.get(e).version===i)return;let s=e;for(i=i.split(".");window.customElements.get(e);)e=s+"-"+i.join("."),i[2]=parseInt(i[2])+1;if(!C[e]){if(e.startsWith(n.toLowerCase()))C[e]=window[n][o]=window[n.toLowerCase()+o]=t;else{let r=e.split("-")[0];r=r.substring(0,1).toUpperCase()+r.substring(1),window[n][r]||(window[n][r]={}),C[e]=window[n][r][o]=window[r.toLowerCase()+o]=t,window[n][o]&&(o=a.toCamelCase(e)),window[n][o]=t}r.elementName=o,r.defineElement(),S[e]&&S[e](r),window.customElements.define(e,t)}}static registerElements(){const e=this;if(e.toRegister){e.isRegistering=!0;for(let t=0;t<e.toRegister.length;t++){const n=e.toRegister[t];e.register(n.tagName,n.element)}e.isRegistering=!1}}static get(e){if(C[e])return C[e]}static whenRegistered(e,t){if(!e)throw new Error("Syntax Error: Invalid tag name");const n=S[e],r=this.get(e),o=r?r.modules.length:3;try{n||r?!n&&r?(t(r.prototype),S[e]=void 0):n&&!r?S[e]=function(e){n(e),t(e)}:n&&r&&(r.proto&&(n(r.proto),t(r.proto)),S[e]=void 0):S[e]=function(e){try{t(e)}catch(e){const t=e instanceof Error?e.message:e.toString();console.log(t)}}}catch(e){const t=e instanceof Error?e.message:e.toString();console.log(t)}if(r&&o!==r.prototype.modules.length){const t=document.querySelectorAll(e);for(let e=0;e<t.length;e++){const n=t[e];n.isCreated&&n._initElement()}}}}T.lazyRegister=!1,T.tagNames=[];class P{constructor(){const e=this;e.name="observableArray",e.observables=arguments.length<3?null:arguments[2];const t=new Proxy(e,{deleteProperty:function(e,t){return delete e[t],!0},apply:function(e,t,n){return e.apply(t,n)},get:function(t,n){return t[n]||isNaN(parseInt(n))?t[n]:e.getItem(parseInt(n))},set:function(t,n,r){return t[n]||isNaN(parseInt(n))?(t[n]=r,!0):(e.setItem(parseInt(n),r),!0)}});if(e._addArgs={eventName:"change",object:t,action:"add",index:null,removed:new Array,addedCount:1},e._removeArgs={eventName:"change",object:t,action:"remove",index:null,removed:null,addedCount:0},arguments.length>=1&&Array.isArray(arguments[0])){e._array=[];const t=arguments[0];for(let n=0,r=t.length;n<r;n++){const r=e._getItem(e._array.length,t[n]);e._array.push(r)}}else e._array=Array.apply(null,arguments);return 2===arguments.length&&(e.notifyFn=arguments[1]),t}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;t.canNotify&&t.notifyFn&&t.notifyFn(e)}notify(e){e&&(this.notifyFn=e)}toArray(){return this._array}_getItem(e,t){const n=this;return"string"==typeof t||"number"==typeof t||void 0===t?t:new Proxy(t,{deleteProperty:function(e,t){return delete e[t],!0},set:function(t,r,o){const i=t[r];return t[r]=o,!n._canNotify||!1===t.canNotify||(n.observables&&!n.observables[r]||n._notify({eventName:"change",object:n,target:t,action:"update",index:e,path:e+"."+r,oldValue:i,newValue:o,propertyName:r}),!0)}})}getItem(e){return this._array[e]}setItem(e,t){const n=this,r=n._array[e];n._array[e]=n._getItem(e,t),n._notify({eventName:"change",object:n._array,action:"update",index:e,removed:[r],addedCount:1})}get length(){return this._array.length}set length(e){const t=this;o.isNumber(e)&&t._array&&t._array.length!==e&&t.splice(e,t._array.length-e)}toString(){return this._array.toString()}toLocaleString(){return this._array.toLocaleString()}concat(){const e=this;e._addArgs.index=e._array.length;const t=e._array.concat.apply(e._array,arguments);return new Smart.ObservableArray(t)}join(e){return this._array.join(e)}pop(){const e=this;e._removeArgs.index=e._array.length-1,delete e[e._array.length-1];const t=e._array.pop();return e._removeArgs.removed=[t],e._notify(e._removeArgs),e._notifyLengthChange(),t}push(){const e=this;if(e._addArgs.index=e._array.length,1===arguments.length&&Array.isArray(arguments[0])){const t=arguments[0];for(let n=0,r=t.length;n<r;n++){const r=e._getItem(e._array.length,t[n]);e._array.push(r)}}else{const t=e._getItem(e._addArgs.index,arguments[0]);e._array.push.apply(e._array,[t])}return e._addArgs.addedCount=e._array.length-e._addArgs.index,e._notify(e._addArgs),e._notifyLengthChange(),e._array.length}_notifyLengthChange(){const e=this;if(!e.canNotify)return;const t=e._createPropertyChangeData("length",e._array.length);e._notify(t)}_createPropertyChangeData(e,t,n){return{eventName:"change",object:this,action:e,value:t,oldValue:n}}reverse(){return this._array.reverse()}shift(){const e=this,t=e._array.shift();return e._removeArgs.index=0,e._removeArgs.removed=[t],e._notify(e._removeArgs),e._notifyLengthChange(),t}slice(e,t){return this._array.slice(e,t)}sort(e){return this._array.sort(e)}splice(e,t,n){const r=this,o=r._array.length;let i;if(n&&n.length)for(let o=0;o<n.length;o++)i=r._array.splice(e+o,t,n[o]);else i=r._array.splice.apply(r._array,arguments);if(n){let t=r.canNotify;if(r.canNotify=!1,n.length)for(let t=0;t<n.length;t++)r.setItem(e+t,n[t]);else r.setItem(e,n);r.canNotify=t,r._notify({eventName:"change",object:this,action:"add",index:e,added:i,addedCount:r._array.length>o?r._array.length-o:0})}else r._notify({eventName:"change",object:this,action:"remove",index:e,removed:i,addedCount:r._array.length>o?r._array.length-o:0});return r._array.length!==o&&r._notifyLengthChange(),i}unshift(){const e=this,t=e._array.length,n=e._array.unshift.apply(e._array,arguments);return e._addArgs.index=0,e._addArgs.addedCount=n-t,e._notify(this._addArgs),e._notifyLengthChange(),n}indexOf(e,t){const n=this;for(let r=t||0,o=n._array.length;r<o;r++)if(n._array[r]===e)return r;return-1}lastIndexOf(e,t){const n=this;for(let r=t||n._array.length-1;r>=0;r--)if(n._array[r]===e)return r;return-1}find(e,t){return this._array.find(e,t)}findIndex(e,t){return this._array.findIndex(e,t)}every(e,t){return this._array.every(e,t)}some(e,t){return this._array.some(e,t)}forEach(e,t){this._array.forEach(e,t)}map(e,t){return this._array.map(e,t)}filter(e,t){return this._array.filter(e,t)}reduce(e,t){return void 0!==t?this._array.reduce(e,t):this._array.reduce(e)}reduceRight(e,t){return void 0!==t?this._array.reduceRight(e,t):this._array.reduceRight(e)}move(e,t){this.splice(t,0,this.splice(e,1)[0])}}let D={};window[n]&&(D=window[n]),window[n]=function(e,t){let r=e;if(e){if(e.indexOf("#")>=0||e.indexOf(".")>=0)return u[e]?u[e]:t?(u[e]=new t,function(e,t){const n=t.properties;t._properties=[];const r=function(n,o){const i=Object.keys(n);for(let s=0;s<i.length;s++){const a=i[s],l=n[a];t._properties[o+a]=l,Array.isArray(l)?t._properties[o+a]=new P(l,(function(t){const n=a+"."+t.path,r=t.newValue,o=document.querySelector(e);if(o){const e=n.split(".");let t=o;for(let n=0;n<e.length;n++)t=t[e[n]];t=r}})):(Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:()=>t._properties[o+a],set(e){t._properties[o+a]=e}}),l&&"DataAdapter"===l.constructor.name||l&&"object"==typeof l&&Smart.DataAdapter&&l instanceof Smart.DataAdapter||"object"==typeof l&&l&&Object.keys(l).length>0&&r(l,o+a+"."))}};r(n,""),Object.defineProperty(t,"properties",{configurable:!1,enumerable:!0,get:()=>n});const o=document.querySelector(e);if(o&&o.isReady)for(let e in n)o[e]=n[e];else if(o){o.props={};for(let e in n)o.props[e]=n[e]}}(e,u[e]),u[e]):void 0;if(t){if(T.tagNames[e]=t,T.lazyRegister){T.toRegister||(T.toRegister=[]);const e=a.toCamelCase(r).replace(/[a-z]+/,"");return window[n][e]=t,void T.toRegister.push({tagName:r,element:t})}T.register(r,t)}}},window.addEventListener("load",(function(){const e=window[n].Elements.tagNames;let t=[];for(let r in e){const o=e[r];let i=document.querySelectorAll("["+r+"]");for(let e=0;e<i.length;e++){const t=i[e];t instanceof HTMLDivElement&&(t.__proto__=o.prototype,t.created(),t.connectedCallback()),t.classList.add("smart-element-ready")}let s=o.name;"Item"===s&&(s="ListItem"),i=document.querySelectorAll('[is="'+n.toLocaleLowerCase()+s+'"]');for(let e=0;e<i.length;e++)t.push(i[e])}if(t.length>0){const e=e=>{let t=[],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==1&&t.push(n),n=n.parentNode;return t};t.sort((function(t,n){let r=e(t).length,o=e(n).length;return r<o?1:r>o?-1:0}));for(let e=0;e<t.length;e++){const n=t[e],r=n.getAttribute("is");let o;o="smartItem"===r?new window.smartListItem(n):new window[r](n),o.removeAttribute("is")}}}));const L=function(){if("complete"===document.readyState&&"manual"!==window[n].RenderMode){x.sort((function(e,t){let n=e.element.parents.length,r=t.element.parents.length;return n<r?-1:n>r?1:0}));for(let e=0;e<x.length;e++)window[n].RenderMode="",x[e].element.isLoading=!1,x[e].callback(),window[n].RenderMode="";x=[],document.removeEventListener("readystatechange",L)}};Object.assign(window[n],{Elements:T,Modules:[],BaseElement:class extends _{static get observedAttributes(){let e=this,t=["external-style"];for(let n in e.prototype.extendedProperties){const r=e.prototype.extendedProperties[n];t.push(r.attributeName)}return t}static get styleUrls(){return[]}static get styles(){return""}get styleUrl(){return this._styleUrl}set styleUrl(e){this._styleUrl=e}get isInShadowDOM(){const e=this,t=e.getRootNode();return!e.hasAttribute("smart-blazor")&&t!==document&&t!==e}getShadowRootOrBody(){const e=this;return e.isInShadowDOM&&e.getRootNode().host?e.getRootNode().host.shadowRoot:document.body}get enableShadowDOM(){return window[n].EnableShadowDOM}importStyle(e,t){this._importStyle(e,t)}_importStyle(e,t){const n=this;if(!n.shadowRoot||!e)return;const r=e=>{const r=n.shadowRoot.children;for(let n=0;n<r.length;n++){const o=r[n];if(o instanceof HTMLLinkElement&&o.href===e)return t&&t(),null}const o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.href=e,o.onload=t,o},o=(()=>{const e=n.shadowRoot.children;let t=null;for(let n=0;n<e.length;n++){const r=e[n];r instanceof HTMLLinkElement&&(t=r)}return t})(),i=(e,t)=>{t.parentNode.insertBefore(e,t.nextSibling)};if(Array.isArray(e)){const t=document.createDocumentFragment();for(let n=0;n<e.length;n++){const o=r(e[n]);o&&t.appendChild(o)}o?i(t,o):n.shadowRoot.insertBefore(t,n.shadowRoot.firstChild)}else{const t=r(e);if(!t)return;o?i(t,o):n.shadowRoot.insertBefore(t,n.shadowRoot.firstChild)}}attributeChanged(e,t,n){"style-url"===e&&(this.styleUrl=n)}attributeChangedCallback(e,t,n){this.isReady&&super.attributeChangedCallback(e,t,n)}constructor(e,t){super();const n=this;if(e){t&&(n._initProperties=t);const r=e=>{if("string"==typeof e?document.querySelector(e):e){const r="string"==typeof e?document.querySelector(e):e;if(r instanceof HTMLDivElement){const o=document.createElement(n.tagName);for(let e of r.attributes)o.setAttribute(e.name,r.getAttribute(e.name));for(;r.childNodes.length;)o.appendChild(r.firstChild);return"string"==typeof e&&(o.id=e.substring(1)),o._initProperties=t,r.parentNode&&r.parentNode.replaceChild(o,r),o}if(t){const e=r.context;if(r._initProperties=t,r.isReady){r.context=r;const n={},o={};for(let e in t)n[e]=r[e],o[e]=t[e];Object.getOwnPropertyNames(t).length>0&&(r.initProperties(),r.propertyChangedHandler(t,n,o)),r.context=e}}return r}};if("string"==typeof e){const t=document.querySelectorAll(e),n=[];if(t.length>1){for(let e=0;e<t.length;e++){const o=r(t[e]);n.push(o)}return n}}else if(e&&e.length>0){const t=e;if(t.length>1){for(let e=0;e<t.length;e++){const n=r(t[e]);C.push(n)}return C}}return r(e)}n._styleUrl="",n.isUtilityElement||n.created()}_getRootShadowParent(){let e=this.shadowParent;for(;e;){if(!e.shadowParent)return e;e=e.shadowParent}return e||this.shadowParent}_getStyleUrl(e){let t=y.Core.getScriptLocation()+window[n].StyleBaseUrl+e;return this.shadowParent&&(t=t.replace("scoped/","")),t}_getStyleUrls(){const e=this;e.nodeName.startsWith(n);const t=e.getStaticMember("styleUrls","array"),r=[];for(let n=0;n<t.length;n++){const o=t[n],i=e._getStyleUrl(o);r.push(i)}return r}_setupShadowRoot(){const e=this;e.classList.add("smart-element-init");const t=t=>{t.$.root&&(t.$.root.classList.add(n.toLowerCase()+"-element"),t.$.root.classList.add(e.nodeName.toLowerCase())),t.setup(),t.classList.remove("smart-element-init")};if(document.adoptedStyleSheets)if(window[n].AdoptedStyleSheets)window[n].AdoptedStyleSheetsLoaded?(e.shadowRoot.adoptedStyleSheets=window[n].AdoptedStyleSheets,t(e)):(e.shadowRoot.adoptedStyleSheets=window[n].AdoptedStyleSheets,window[n].AdoptedStyleSheetsLoadedQueue||(window[n].AdoptedStyleSheetsLoadedQueue=[]),window[n].AdoptedStyleSheetsLoadedQueue.push(e));else{const r=new CSSStyleSheet;let o=y.Core.getScriptLocation()+"/styles/smart.default.css";r.replace('@import url("'+o+'")').then((()=>{if(t(e),window[n].AdoptedStyleSheetsLoaded=!0,window[n].AdoptedStyleSheetsLoadedQueue){const e=window[n].AdoptedStyleSheetsLoadedQueue;for(let n=0;n<e.length;n++){const r=e[n];t(r)}delete window[n].AdoptedStyleSheetsLoadedQueue}})).catch((e=>{console.error("Failed to load:",e)})),window[n].AdoptedStyleSheets=[r],document.adoptedStyleSheets=[r],e.shadowRoot.adoptedStyleSheets=window[n].AdoptedStyleSheets}}connect(){const e=this;window[n].EnableShadowDOM&&!e.shadowRoot&&!0!==e.isInShadowDOM&&(e.attachShadow({mode:"open"}),e.shadowRoot&&e.$.root&&(e.shadowRoot.appendChild(e.$.root),e.$.root.classList.add(e.nodeName.toLowerCase()))),e.shadowRoot||e.shadowParent?e.shadowRoot?e._setupShadowRoot():(e.shadowParent&&window[n].EnableShadowDOM,e.setup()):e.setup()}connectedCallback(){const e=this;if(e.isLoading||e.isUtilityElement)return;e.classList.add("smart-element-init");const t=function(){e.classList.remove("smart-element-init")};if("complete"===document.readyState&&(void 0===window[n].isAngular&&(window[n].isAngular=null!==document.body.querySelector("[ng-version]")),window[n].isAngular))for(let t=0;t<e.parents.length&&!e.parents[t].nodeName.toLowerCase().startsWith(n.toLowerCase()+"-");t++)if(e.parents[t].hasAttribute("ng-version")&&!e.classList.contains("smart-angular")){window[n].RenderMode="manual";break}if("complete"===document.readyState&&"manual"!==window[n].RenderMode){const n=e.parents;n.length&&"HTML"===n[n.length-1].nodeName||e.getRootNode().host?(e.checkIsInDomTimer&&clearInterval(e.checkIsInDomTimer),t(),e.connect()):(e.checkIsInDomTimer&&clearInterval(e.checkIsInDomTimer),n.length>0&&(e.checkIsInDomTimer=setInterval((()=>{const n=e.parents;0===n.length&&clearInterval(e.checkIsInDomTimer),n.length>0&&"HTML"===n[n.length-1].nodeName&&(clearInterval(e.checkIsInDomTimer),t(),e.connect())}),100)))}else e.isLoading=!0,x.push({element:this,callback:function(){this.isReady||(t(),this.connect())}.bind(e)})}disconnectedCallback(){const e=this;e.isAttached?(e.shadowParent=null,e.detached()):e._resetShadowParent()}adoptedCallback(){this.setup()}appendTemplate(e){const t=this;t.shadowRoot?t.shadowRoot.appendChild(e):t.appendChild(e)}_resetShadowParent(){const e=this;if(!window[n].EnableShadowDOM||null===e.shadowParent)return;const t=[];let r=e.parentNode;for(;r&&9!==r.nodeType;){if(r instanceof HTMLElement==1)t.push(r);else if(11===r.nodeType&&r.host){r=r.host;continue}r=r.parentNode}for(let n=0;n<t.length;n++)if(t[n]===e.shadowParent)return;t.length>0&&"HTML"===t[t.length-1].nodeName&&(e.shadowParent=null)}},Utilities:y,Import:function(e,t){let n=0;const r=function(e,t){return new Promise((n=>{const r=document.createElement("script");r.src=e,r.onload=n;for(let e=0;e<document.head.children.length;e++){const r=document.head.children[e];if(r.src&&r.src.toString().indexOf(t)>=0)return void n()}document.head.appendChild(r)}))};return new Promise((o=>{const i=y.Core.getScriptLocation(),s=function(t){if(!e[t])return;const a=i+"/"+e[t];r(a,e[t]).then((function(){n++,n===e.length&&o(),s(t+1)}))};if(t)for(let t=0;t<e.length;t++){const s=i+"/"+e[t];r(s,e[t]).then((function(){n++,n===e.length&&o()}))}else s(0)}))},ObservableArray:P,Observable:class{constructor(e,t){const n=this;var r;return this.name="observable",e&&Object.assign(n,e),r=e,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((e=>"constructor"===e||!!e.startsWith("_")||void(n[e]=r[e]))),new Proxy(n,{deleteProperty:function(e,t){return delete e[t],!0},get:function(e,t){return e[t]},set:function(e,r,o){const i=e[r];return i===o||(e[r]=o,!("notifyFn"!==r&&!r.startsWith("_")&&"canNotify"!==r&&(!t||-1!==t.indexOf(r))&&n.canNotify&&(n._notify({target:e,propertyName:r,oldValue:i,newValue:o}),0)))}})}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;if(t.canNotify&&t.notifyFn)for(let n=0;n<t.notifyFn.length;n++)t.notifyFn[n](e)}notify(e){const t=this;e&&(t.notifyFn||(t.notifyFn=[]),t.notifyFn.push(e))}},Component:class{constructor(e,t){const n=this.name;let r=null;return e?r=new window[n](e,t):(r=new window[n],r._initProperties=t),this._element=r,r}get name(){return"Component"}get element(){return this._element}},Theme:D.Theme||"",EnableShadowDOM:D.ShadowDom||!1,BaseUrl:"./",StyleBaseUrl:"/styles/default/",Version:e,Templates:t,RenderMode:D.RenderMode||"auto",Render:function(){const e=()=>{window[n].RenderMode="",L()};"complete"===document.readyState?e():(window.removeEventListener("load",e),window.addEventListener("load",e))},Data:u,Mode:D.Mode||"production",License:D.License||"Evaluation"});let O=window[n].Theme;"manual"!==window[n].RenderMode&&document.addEventListener("readystatechange",L),Object.defineProperty(window[n],"Theme",{configurable:!1,enumerable:!0,get:()=>O,set(e){const t=O;O=e,w.fireEvent("theme-changed",{oldValue:t,newValue:e},{bubbles:!0,cancelable:!0})}}),window[n]("smart-base-element",window[n].BaseElement),window[n]("smart-content-element",class extends window[n].BaseElement{static get properties(){return{content:{type:"any",reflectToAttribute:!1},innerHTML:{type:"string",reflectToAttribute:!1}}}template(){return"<div inner-h-t-m-l='[[innerHTML]]'></div>"}ready(){super.ready(),this.applyContent()}refresh(){}clearContent(){const e=this;for(;e.$.content.firstChild;)e.$.content.removeChild(e.$.content.firstChild)}applyContent(){const e=this;if(void 0===e.content)return void(e.content=e.$.content);if(""===e.content||null===e.content)return void e.clearContent();if(e.content instanceof HTMLElement)return e.clearContent(),void e.$.content.appendChild(e.content);const t=document.createDocumentFragment();let n=document.createElement("div");t.appendChild(n),e.content instanceof HTMLElement?n.appendChild(e.content):n.innerHTML=e.content;let r=Array.from(n.childNodes);n.parentNode.removeChild(n);for(let e=0;e<r.length;e++)t.appendChild(r[e]);e.clearContent(),e.$.content.appendChild(t)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const r=this;t!==n&&("innerHTML"===e&&(r.content=n,r.applyContent(),r.innerHTML=r.content=y.Core.html(r.$.content)),"content"===e&&r.applyContent())}}),window[n]("smart-scroll-viewer",class extends window[n].ContentElement{static get properties(){return{autoRefresh:{type:"boolean",value:!1},horizontalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]},touchScrollRatio:{type:"any",value:null},touchVelocityCoefficient:{type:"number",value:50},verticalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]}}}static get listeners(){return{touchmove:"_touchmoveHandler",touchstart:"_touchstartHandler",wheel:"_mouseWheelHandler","document.up":"_upHandler"}}static get styleUrls(){return["smart.scrollviewer.css"]}template(){return'<div id="container" class="smart-container" role="presentation">\n <div id="scrollViewerContainer" class="smart-scroll-viewer-container" role="presentation">\n <div id="scrollViewerContentContainer" inner-h-t-m-l=\'[[innerHTML]]\' class="smart-scroll-viewer-content-container" role="presentation">\n <content></content>\n </div>\n </div>\n <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>\n <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>\n </div>'}appendChild(e){const t=this;if(e){if(!t.isCompleted||e.classList&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}t.$.scrollViewerContentContainer.appendChild(e)}}removeChild(e){const t=this;if(e){if(!t.isCompleted||e.classList&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.removeChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}t.$.scrollViewerContentContainer.removeChild(e)}}removeAll(){const e=this;e.isCompleted&&(e.$.scrollViewerContentContainer.innerHTML="")}_horizontalScrollbarHandler(e){const t=this;t.$.scrollViewerContentContainer.style.left=(t.rightToLeft?1:-1)*t.scrollLeft+"px",e.stopPropagation&&e.stopPropagation(),t.onHorizontalChange&&t.onHorizontalChange(e)}_verticalScrollbarHandler(e){const t=this;t.$.scrollViewerContentContainer.style.top=-t.scrollTop+"px",e.stopPropagation&&e.stopPropagation(),t.onVerticalChange&&t.onVerticalChange(e)}_touchmoveHandler(e){const t=this;if(t._touchmoveInside&&e.cancelable)return e.preventDefault(),void e.stopPropagation();const n=t.scrollHeight>0,r=t.scrollWidth>0,o=t._touchCoords;if(!n&&!r||!o)return;const i=e.touches[0];let s,a,l,d;t._touchCoords=[i.pageX,i.pageY],n?(s=t.scrollTop,a=t.scrollHeight,l=i.pageY,d=o[1]):(s=t.scrollLeft,a=t.scrollWidth,l=i.pageX,d=o[0]);const c=parseFloat(l.toFixed(5)),u=parseFloat(d.toFixed(5));0===s&&c>=u||s===a&&c<=u||(l!==d&&(t._touchmoveInside=!0),e.cancelable&&(e.preventDefault(),e.stopPropagation()))}_touchstartHandler(e){const t=e.touches[0];this._touchCoords=[t.pageX,t.pageY]}_mouseWheelHandler(e){const t=this;if(!t.disabled&&(t.computedHorizontalScrollBarVisibility||t.computedVerticalScrollBarVisibility)){if(e.shiftKey&&t.computedHorizontalScrollBarVisibility){const n=t.scrollLeft;if(0===n&&e.deltaX<0||n===t.scrollHeight&&e.deltaX>0)return;return e.stopPropagation(),e.preventDefault(),void(t.scrollWidth>0&&t.scrollTo(void 0,t.scrollLeft+t._getScrollCoefficient(e,t.offsetWidth)))}if(t.computedVerticalScrollBarVisibility){const n=t.scrollTop;if(0===n&&e.deltaY<0||n===t.scrollHeight&&e.deltaY>0)return;e.stopPropagation(),e.preventDefault(),t.scrollHeight>0&&t.scrollTo(t.scrollTop+t._getScrollCoefficient(e,t.offsetHeight))}}}_overriddenHandler(){}_upHandler(){delete this._touchCoords,delete this._touchmoveInside}_getScrollCoefficient(e,t){const n=e.deltaMode,r=Math.abs(e.deltaY);let o;return 0===n?o=r<100/3?r:t:1===n?o=r<1?r*(100/3):t:2===n&&(o=t),e.deltaY<0?-o:o}applyContent(){super.applyContent(),this.refresh()}get computedHorizontalScrollBarVisibility(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?!e._scrollView.hScrollBar.$.hasClass("smart-hidden"):null}get computedVerticalScrollBarVisibility(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?!e._scrollView.vScrollBar.$.hasClass("smart-hidden"):null}scrollTo(e,t){const n=this;n._scrollView&&(void 0!==e&&n._scrollView.scrollTo(e),void 0!==t&&n._scrollView.scrollTo(t,!1))}refreshScrollBarsVisibility(){const e=this;e._scrollView&&(e._scrollView.hScrollBar.disabled=e.disabled,e._scrollView.vScrollBar.disabled=e.disabled,"disabled"===e.horizontalScrollBarVisibility&&(e._scrollView.hScrollBar.disabled=!0),"disabled"===e.verticalScrollBarVisibility&&(e._scrollView.vScrollBar.disabled=!0),e.scrollWidth>0?e._scrollView.hScrollBar.$.removeClass("smart-hidden"):"visible"!==e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.addClass("smart-hidden"),e.scrollHeight>0?e._scrollView.vScrollBar.$.removeClass("smart-hidden"):"visible"!==e.verticalScrollBarVisibility&&e._scrollView.vScrollBar.$.addClass("smart-hidden"),"hidden"===e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.addClass("smart-hidden"),"hidden"===e.verticalScrollBarVisibility&&e._scrollView.vScrollBar.$.addClass("smart-hidden"),"visible"===e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.removeClass("smart-hidden"),"visible"===e.verticalScrollBarVisibility&&(e._scrollView.vScrollBar.$.removeClass("smart-hidden"),e.disabled||(e._scrollView.vScrollBar.disabled=e.scrollHeight<=0)),e.computedHorizontalScrollBarVisibility&&e.computedVerticalScrollBarVisibility?(e._scrollView.hScrollBar.$.addClass("bottom-corner"),e._scrollView.vScrollBar.$.addClass("bottom-corner")):(e._scrollView.hScrollBar.$.removeClass("bottom-corner"),e._scrollView.vScrollBar.$.removeClass("bottom-corner")))}ready(){super.ready();const e=this;e.$.verticalScrollBar.onChange=t=>{t.detail=t,e._verticalScrollbarHandler(t)},e.$.horizontalScrollBar.onChange=t=>{t.detail=t,e._horizontalScrollbarHandler(t)},e.$.verticalScrollBar.setAttribute("aria-controls",e.id),e.$.horizontalScrollBar.setAttribute("aria-controls",e.id),e._customScrollView||(e._scrollView=new Smart.Utilities.Scroll(e,e.$.horizontalScrollBar,e.$.verticalScrollBar)),e.refresh()}refresh(){const e=this;function t(){const t=e.$.scrollViewerContainer.classList.contains("vscroll");e.$.scrollViewerContainer.classList.remove("vscroll");const n=e.$.scrollViewerContentContainer.offsetWidth-e.$.scrollViewerContainer.offsetWidth;return n>0&&"hidden"!==e.horizontalScrollBarVisibility||"visible"===e.horizontalScrollBarVisibility?e.$.scrollViewerContainer.classList.add("hscroll"):e.$.scrollViewerContainer.classList.remove("hscroll"),t&&e.$.scrollViewerContainer.classList.add("vscroll"),n}function n(){let t;const n=e.$.scrollViewerContainer.classList.contains("hscroll");if(e.$.scrollViewerContainer.classList.remove("hscroll"),Smart.Utilities.Core.Browser.Safari){const n=e.$.scrollViewerContentContainer.getBoundingClientRect().height,r=e.$.scrollViewerContainer.getBoundingClientRect().height;t=n&&r?parseInt(n)-parseInt(r):e.$.scrollViewerContentContainer.offsetHeight-e.$.scrollViewerContainer.offsetHeight}else t=e.$.scrollViewerContentContainer.offsetHeight-e.$.scrollViewerContainer.offsetHeight;return e.virtualScrollHeight&&(t=e.virtualScrollHeight),t>0&&"hidden"!==e.verticalScrollBarVisibility||"visible"===e.verticalScrollBarVisibility?e.$.scrollViewerContainer.classList.add("vscroll"):e.$.scrollViewerContainer.classList.remove("vscroll"),n&&e.$.scrollViewerContainer.classList.add("hscroll"),t}if(!e.$.scrollViewerContentContainer)return;"hidden"===e.verticalScrollBarVisibility&&e.$.scrollViewerContentContainer.setAttribute("disable-vertical",""),"hidden"===e.horizontalScrollBarVisibility&&e.$.scrollViewerContentContainer.setAttribute("disable-horizontal","");let r=e.scrollWidth,o=e.scrollHeight;e.scrollWidth=t(),e.scrollHeight=n(),e.scrollHeight&&o===e.scrollHeight||(e.scrollWidth=t()),e.scrollWidth&&r===e.scrollWidth||(e.scrollHeight=n()),e.computedVerticalScrollBarVisibility&&(e.scrollHeight+=e._scrollView.hScrollBar.offsetHeight),e.computedHorizontalScrollBarVisibility&&(e.scrollWidth+=e._scrollView.vScrollBar.offsetWidth),0===e.scrollHeight&&e.scrollWidth>0&&e.$.container.offsetHeight-e.$.content.offsetHeight<5&&(e.$.container.style.paddingBottom=e._scrollView.hScrollBar.offsetHeight+"px"),e.autoRefresh&&(e.$.scrollViewerContainer.scrollLeft=0,e.$.scrollViewerContainer.scrollTop=0)}attached(){const e=this;super.attached(),e._scrollView||e._customScrollView||(e._scrollView=new Smart.Utilities.Scroll(e,e.$.horizontalScrollBar,e.$.verticalScrollBar))}detached(){const e=this;super.detached(),e._scrollView&&(e._scrollView.unlisten(),delete e._scrollView)}get scrollWidth(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?1===e._scrollView.hScrollBar.max&&"visible"===e.horizontalScrollBarVisibility?0:e._scrollView.hScrollBar.max:-1}set scrollWidth(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.hScrollBar&&(0===e&&"visible"===t.horizontalScrollBarVisibility?t._scrollView.hScrollBar.max=0:t._scrollView.hScrollBar.max=e,t.refreshScrollBarsVisibility())}get scrollHeight(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?1===e._scrollView.vScrollBar.max&&"visible"===e.verticalScrollBarVisibility?0:e._scrollView.vScrollBar.max:0}set scrollHeight(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.vScrollBar&&(0===e&&"visible"===t.verticalScrollBarVisibility?t._scrollView.vScrollBar.max=1:t._scrollView.vScrollBar.max=e,t.refreshScrollBarsVisibility())}get scrollLeft(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?e._scrollView.hScrollBar.value:0}set scrollLeft(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.hScrollBar&&(t._scrollView.hScrollBar.value=e)}get scrollTop(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?e._scrollView.vScrollBar.value:0}set scrollTop(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.vScrollBar&&(t._scrollView.vScrollBar.value=e)}propertyChangedHandler(e,t,n){const r=this;super.propertyChangedHandler(e,t,n),"animation"!==e&&"theme"!==e&&r.refresh()}}),window[n].Utilities.Assign("PositionDetection",class{constructor(e,t,n,r){const o=this;if(t){const n="dropDown"+Math.floor(65536*(1+Math.random())).toString(16).substring(1);t.id=n,e.setAttribute("aria-owns",n)}o.context=e,o.dropDown=t,o.defaultParent=n,o.closeMethod=r}handleAutoPositioning(){const e=this,t=e.context;if("auto"!==t.dropDownPosition||t.disabled||t.isHidden)return;const n=window.requestAnimationFrame;let r,o=Date.now();return r=n((function i(){t.isHidden||document.hidden||(r=n(i),"auto"===t.dropDownPosition&&!t.disabled&&(t.isInShadowDOM?document.body.contains(t.shadowParent):document.body.contains(t))||cancelAnimationFrame(r),t.isHidden&&cancelAnimationFrame(r),Date.now()-o>=200&&(e.scrollHandler(),o=Date.now()))}))}checkBrowserBounds(e){const t=this.context;if("auto"===t.dropDownPosition&&!t.disabled)switch(e){case"vertically":this.checkBrowserBoundsVertically();break;case"horizontally":this.checkBrowserBoundsHorizontally();break;default:this.checkBrowserBoundsVertically(),this.checkBrowserBoundsHorizontally()}}checkBrowserBoundsHorizontally(){const e=this.context,t=this.dropDown;let n,r=0;a.isMobile||window.innerWidth===document.documentElement.clientWidth||(r=window.innerWidth-document.documentElement.clientWidth),null!==e._dropDownParent?n=!0:t.style.left="";const o=window.innerWidth-r;let i=e.getBoundingClientRect().left;if(i<0&&(t.style.left=(n?0:Math.abs(i))+"px",i=parseFloat(t.style.left)),i+t.offsetWidth>o){let e=i-Math.abs(o-i-t.offsetWidth);n&&(e+=window.pageXOffset),t.style.left=(n?e:e-i)+"px",window.innerWidth===document.documentElement.clientWidth&&(t.style.left=parseFloat(t.style.left)+r+"px"),n&&window.innerHeight===document.documentElement.clientHeight&&this.positionDropDown(!0)}}checkBrowserBoundsVertically(e){const t=this.context,n=this.dropDown,r=t._dropDownListPosition;e||(e=t.getBoundingClientRect()),0!==e.height&&(document.documentElement.clientHeight-Math.abs(e.top+e.height+n.offsetHeight)>=0?t._dropDownListPosition="bottom":e.top-n.offsetHeight>=0?t._dropDownListPosition="top":t._dropDownListPosition="overlay-center",this.updatePositionAttribute(r,t._dropDownListPosition))}scrollHandler(){const e=this.context;if(!e.parentElement)return;const t=e.getBoundingClientRect();if(t.top===e._positionTop)return;const n=e._dropDownListPosition;this.checkBrowserBoundsVertically(t),e._dropDownListPosition!==n&&this.positionDropDown(),e._positionTop=t.top}getDropDownParent(e){const t=this.context,n=this.dropDown;let r=t.dropDownAppendTo;t._positionedParent=null,null===r?t._dropDownParent=null:"body"===r||r===document.body?t.getRootNode().host?t._dropDownParent=t.getRootNode().host.shadowRoot:t._dropDownParent=document.body:r instanceof HTMLElement?t._dropDownParent=r:"string"==typeof r?(r=document.getElementById(r),r instanceof HTMLElement?t._dropDownParent=r:(t.dropDownAppendTo=null,t._dropDownParent=null)):(t.dropDownAppendTo=null,t._dropDownParent=null);let o=t._dropDownParent;if(null!==o){for(;o&&o instanceof HTMLElement&&"static"===window.getComputedStyle(o).position&&o!==t.getShadowRootOrBody();)o=o.parentElement;o===document.body?t._positionedParent=null:t._positionedParent=o,n&&(n.setAttribute("animation",t.animation),""!==t.theme&&n.$.addClass(t.theme),e&&(t._dropDownParent.appendChild(n),n.$.addClass("smart-drop-down-repositioned")),-1===t.detachedChildren.indexOf(n)&&t.detachedChildren.push(n))}}dropDownAppendToChangedHandler(){const e=this.context,t=this.dropDown,n=e._dropDownParent;this.getDropDownParent(),e._dropDownParent!==n&&(e[this.closeMethod](),["left","top","font-size","font-family","font-style","font-weight"].forEach((e=>t.style[e]=null)),null===e._dropDownParent?(this.defaultParent.appendChild(t),t.$.removeClass("smart-drop-down-repositioned")):(e._dropDownParent.appendChild(t),t.$.addClass("smart-drop-down-repositioned")))}dropDownPositionChangedHandler(){const e=this;e.dropDown.style.transition="none",e.context[e.closeMethod](),e.setDropDownPosition(),e.handleAutoPositioning()}dropDownAttached(e){const t=this.context;null!==t._dropDownParent&&(t._dropDownParent.appendChild(this.dropDown),this.handleAutoPositioning(),e&&t[e]())}dropDownDetached(){const e=this.context;null!==e._dropDownParent&&document.body.contains(this.dropDown)&&document.body.contains(e._dropDownParent)&&e._dropDownParent.removeChild(this.dropDown)}setDropDownPosition(){const e=this.context,t=e.dropDownPosition,n=e._dropDownListPosition;"auto"===t?this.checkBrowserBounds():e._dropDownListPosition=t,this.updatePositionAttribute(n,e._dropDownListPosition)}updatePositionAttribute(e,t){const n=this.context,r=this.dropDown;n.$.dropDownButton&&!n.$.dropDownButton.hasAttribute(t)&&(n.$.dropDownButton.removeAttribute(e),n.$.dropDownButton.setAttribute(t,"")),r.hasAttribute(t)||(r.style.transition="none",r.removeAttribute(e),r.setAttribute(t,""),requestAnimationFrame((function(){r.style.transition=null})))}positionDropDown(e){const t=this.context,n=this.dropDown;if(!t.opened||null===t._dropDownParent)return;const r=t.getBoundingClientRect();let o,i;if(this.customPositionDropDown){const e=this.customPositionDropDown(r);o=e.left,i=e.top}else switch(o=r.left,i=r.top,t._dropDownListPosition){case"bottom":i+=t.$.container.offsetHeight-1;break;case"center-bottom":i+=t.$.container.offsetHeight-1,o+=t.offsetWidth-n.offsetWidth/2;break;case"center-top":i-=n.offsetHeight-1,o+=t.offsetWidth-n.offsetWidth/2;break;case"top":i-=n.offsetHeight-1;break;case"overlay-bottom":break;case"overlay-center":i-=n.offsetHeight/2-t.offsetHeight/2;break;case"overlay-top":i-=n.offsetHeight-t.offsetHeight}const s=this.getDropDownOffset();n.style.top=i+s.y+"px",e||(n.style.left=o+s.x+"px")}getDropDownOffset(){const e=this.context._positionedParent;let t,n;if(e&&"#document-fragment"!==e.nodeName){const r=e.getBoundingClientRect();t=-r.left,n=-r.top}else t=window.pageXOffset,n=window.pageYOffset;return{x:t,y:n}}placeOverlay(){const e=this.context;if(!e.dropDownOverlay||e._overlay)return;const t=document.createElement("div");t.classList.add("smart-drop-down-overlay"),t.style.width=document.documentElement.scrollWidth+"px",t.style.height=document.documentElement.scrollHeight+"px",document.body.appendChild(t),e._overlay=t}removeOverlay(e){const t=this,n=t.context;n._overlay&&(n.hasAnimation&&e?requestAnimationFrame((function e(){t.dropDown.getBoundingClientRect().height>0?requestAnimationFrame(e):(document.body.removeChild(n._overlay),delete n._overlay)})):(document.body.removeChild(n._overlay),delete n._overlay))}}),window.Smart.Color=class{constructor(e){if(window.Smart._colors||(window.Smart._colors=[]),window.Smart._colors[e]){const t=window.Smart._colors[e];return this.hex=t.hex,this.r=t.r,this.g=t.g,void(this.b=t.b)}this.r=this.g=this.b=0,this.hex="";const t=this.getStandardizedColor(e);t&&(this.setHex(t.substring(1)),window.Smart._colors[e]={hex:this.hex,r:this.r,g:this.g,b:this.b})}getStandardizedColor(e){const t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle}getInvertedColor(){return""===this.hex?"transparent":255-(.299*this.r+.587*this.g+.114*this.b)<105?"Black":"White"}hexToRgb(e){let t="00",n="00",r="00";return 6===(e=this.validateHex(e)).length?(t=e.substring(0,2),n=e.substring(2,4),r=e.substring(4,6)):(e.length>4&&(t=e.substring(4,e.length),e=e.substring(0,4)),e.length>2&&(n=e.substring(2,e.length),e=e.substring(0,2)),e.length>0&&(r=e.substring(0,e.length))),{r:this.hexToInt(t),g:this.hexToInt(n),b:this.hexToInt(r)}}validateHex(e){return(e=(e=new String(e).toUpperCase()).replace(/[^A-F0-9]/g,"0")).length>6&&(e=e.substring(0,6)),e}webSafeDec(e){return e=Math.round(e/51),e*=51}hexToWebSafe(e){let t,n,r;return 3===e.length?(t=e.substring(0,1),n=e.substring(1,1),r=e.substring(2,1)):(t=e.substring(0,2),n=e.substring(2,4),r=e.substring(4,6)),this.intToHex(this.webSafeDec(this.hexToInt(t)))+this.intToHex(this.webSafeDec(this.hexToInt(n)))+this.intToHex(this.webSafeDec(this.hexToInt(r)))}rgbToWebSafe(e){return{r:this.webSafeDec(e.r),g:this.webSafeDec(e.g),b:this.webSafeDec(e.b)}}rgbToHex(e){return this.intToHex(e.r)+this.intToHex(e.g)+this.intToHex(e.b)}intToHex(e){let t=parseInt(e).toString(16);return 1===t.length&&(t="0"+t),t.toUpperCase()}hexToInt(e){return parseInt(e,16)}setRgb(e,t,n){let r=function(e){return e<0||e>255||isNaN(parseInt(e))?0:e};this.r=r(e),this.g=r(t),this.b=r(n),this.hex=this.rgbToHex(this)}setHex(e){this.hex=e;let t=this.hexToRgb(this.hex);this.r=t.r,this.g=t.g,this.b=t.b}}}();
/***/ }),
/***/ 8687:
/***/ (() => {
(()=>{let t;try{BigInt,t=!0}catch(i){t=!1}Smart.Utilities.Assign("BigNumber",class{constructor(t,i,e){var r,n=this;if(Smart.Utilities.BigNumber.bigIntSupport){if(t instanceof Smart.Utilities.BigNumber){if(!Array.isArray(t._d))return new Smart.Utilities.BigNumber(t._d);t=(t._s?"-":"")+(t._d.slice(0,t._f).join("")||"0")+(t._f!=t._d.length?"."+t._d.slice(t._f).join(""):"")}try{null===t?n._d=BigInt(0):"string"==typeof t&&-1!==t.toLowerCase().indexOf("e")?n._d=BigInt(parseFloat(t)):n._d=BigInt(t)}catch(i){try{const i=t.toString().split(".");let e=BigInt(i[0]),r=parseInt(i[1].charAt(0));if(e>=0&&r>=5)e+=BigInt(1);else if(e<0)if(r>5)e-=BigInt(1);else if(5===r){let t=1,r=i[1].charAt(t),n=!1;for(;""!==r;)if(t++,r=i[1].charAt(t),"0"!==r){n=!0;break}n&&(e-=BigInt(1))}n._d=e}catch(t){n._d=BigInt(0)}}return n._f=n._d.toString().replace("-","").length,void(n._s=n._d<0)}if(t instanceof Smart.Utilities.BigNumber){if("bigint"==typeof t._d)return new Smart.Utilities.BigNumber(t._d.toString());for(r in{precision:0,roundType:0,_s:0,_f:0})n[r]=t[r];return n._d=t._d.slice(),void(t._s&&1===t._d.length&&0===t._d[0]&&(n._s=!1))}if(void 0!==t&&("-0"===t&&(t="0"),new RegExp(/e/i).test(t))){var s=t.toString().toLowerCase(),a=s.indexOf("e"),l=new Smart.Utilities.BigNumber(s.slice(0,a)),_=s.slice(a+2),u=s.slice(a+1,a+2),o=new Smart.Utilities.BigNumber(10).pow(u+_);t=l.multiply(o).toString()}for(n.precision=isNaN(i=Math.abs(i))?Smart.Utilities.BigNumber.defaultPrecision:i,n.roundType=isNaN(e=Math.abs(e))?Smart.Utilities.BigNumber.defaultRoundType:e,n._s="-"==(t+="").charAt(0),n._f=((t=t.replace(/[^\d.]/g,"").split(".",2))[0]=t[0].replace(/^0+/,"")||"0").length,r=(t=n._d=(t.join("")||"0").split("")).length;r;t[--r]=+t[r]);n.round()}static get defaultPrecision(){return 40}static get defaultRoundType(){return 4}static get bigIntSupport(){return t&&!0!==Smart.Utilities.BigNumber.ignoreBigIntNativeSupport}add(t){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d+new Smart.Utilities.BigNumber(t)._d);let i=this.normalizeOperand(this);if(t=i.normalizeOperand(t),i.isZero()&&i._s&&(i._s=!1),0===t||t.constructor===Smart.Utilities.BigNumber&&1===t._d.length&&0===t._d[0])return new Smart.Utilities.BigNumber(i);if(i._s!=(t=new Smart.Utilities.BigNumber(t))._s)return t._s^=1,i.subtract(t);var e,r,n=new Smart.Utilities.BigNumber(i),s=n._d,a=t._d,l=n._f,_=t._f;for(t=Math.max(l,_),l!=_&&((_=l-_)>0?n._zeroes(a,_,1):n._zeroes(s,-_,1)),e=(l=s.length)==(_=a.length)?s.length:((_=l-_)>0?n._zeroes(a,_):n._zeroes(s,-_)).length,r=0;e;r=(s[--e]=s[e]+a[e]+r)/10>>>0,s[e]%=10);return r&&++t&&s.unshift(r),n._f=t,n.round()}subtract(t){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d-new Smart.Utilities.BigNumber(t)._d);let i=this.normalizeOperand(this);if(t=i.normalizeOperand(t),i.isZero()&&i._s&&(i._s=!1),0===t||t.constructor===Smart.Utilities.BigNumber&&1===t._d.length&&0===t._d[0])return new Smart.Utilities.BigNumber(i);if(i._s!=(t=new Smart.Utilities.BigNumber(t))._s)return t._s^=1,i.add(t);var e,r,n=new Smart.Utilities.BigNumber(i),s=n.abs().compare(t.abs())+1,a=s?n:t,l=s?t:n,_=a._f,u=l._f,o=_;for(a=a._d,l=l._d,_!=u&&((u=_-u)>0?n._zeroes(l,u,1):n._zeroes(a,-u,1)),e=(_=a.length)==(u=l.length)?a.length:((u=_-u)>0?n._zeroes(l,u):n._zeroes(a,-u)).length;e;){if(a[--e]<l[e]){for(r=e;r&&!a[--r];a[r]=9);--a[r],a[e]+=10}l[e]=a[e]-l[e]}return s||(n._s^=1),n._f=o,n._d=l,n.round()}multiply(t){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d*new Smart.Utilities.BigNumber(t)._d);let i=this.normalizeOperand(this);t=i.normalizeOperand(t);var e,r,n,s=new Smart.Utilities.BigNumber(i),a=s._d.length>=(t=new Smart.Utilities.BigNumber(t))._d.length,l=(a?s:t)._d,_=(a?t:s)._d,u=l.length,o=_.length,g=new Smart.Utilities.BigNumber;for(e=o;e;a&&n.unshift(a),g.set(g.add(new Smart.Utilities.BigNumber(n.join("")))))for(n=new Array(o- --e).join("0").split(""),a=0,r=u;r;a+=l[--r]*_[e],n.unshift(a%10),a=a/10>>>0);return s._s=s._s!=t._s,s._f=((a=u+o-s._f-t._f)>=(r=(s._d=g._d).length)?i._zeroes(s._d,a-r+1,1).length:r)-a,s.round()}divide(t){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d/new Smart.Utilities.BigNumber(t)._d);let i=this.normalizeOperand(this);if(t=i.normalizeOperand(t),"0"==(t=new Smart.Utilities.BigNumber(t)))throw new Error("Division by 0");if("0"==i)return new Smart.Utilities.BigNumber;var e,r,n,s=new Smart.Utilities.BigNumber(i),a=s._d,l=t._d,_=a.length-s._f,u=l.length-t._f,o=new Smart.Utilities.BigNumber,g=0,m=1,d=0,h=0;for(o._s=s._s!=t._s,o.precision=Math.max(s.precision,t.precision),o._f=+o._d.pop(),_!=u&&s._zeroes(_>u?l:a,Math.abs(_-u)),t._f=l.length,(l=t)._s=!1,l=l.round(),t=new Smart.Utilities.BigNumber;"0"==a[0];a.shift());t:do{for(n=d=0,"0"==t&&(t._d=[],t._f=0);g<a.length&&-1==t.compare(l);++g){if(n=g+1==a.length,(!m&&++d>1||(h=n&&"0"==t&&"0"==a[g]))&&(o._f==o._d.length&&++o._f,o._d.push(0)),"0"==a[g]&&"0"==t||(t._d.push(a[g]),++t._f),h)break t;if(n&&-1==t.compare(l)&&(o._f==o._d.length&&++o._f,1)||(n=0))for(;o._d.push(0),t._d.push(0),++t._f,-1==t.compare(l););}if(m=0,-1==t.compare(l)&&!(n=0))for(;n?o._d.push(0):n=1,t._d.push(0),++t._f,-1==t.compare(l););var f;for(r=new Smart.Utilities.BigNumber,e=0;t.compare(f=r.add(l))+1&&++e;r.set(f));t.set(t.subtract(r)),!n&&o._f==o._d.length&&++o._f,o._d.push(e)}while((g<a.length||"0"!=t)&&o._d.length-o._f<=o.precision);return o.round()}mod(t){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d%new Smart.Utilities.BigNumber(t)._d);let i=this.normalizeOperand(this);t=i.normalizeOperand(t);var e=i.subtract(i.divide(t).intPart().multiply(t));return e.isZero()&&e._s&&(e._s=!e._s),e}pow(t){if(Smart.Utilities.BigNumber.bigIntSupport){let i=BigInt(1);for(let e=BigInt(0);e<new Smart.Utilities.BigNumber(t)._d;e+=BigInt(1))i*=this._d;return new Smart.Utilities.BigNumber(i)}let i=this.normalizeOperand(this);t=i.normalizeOperand(t);var e,r=new Smart.Utilities.BigNumber(i);if(0==(t=new Smart.Utilities.BigNumber(t).intPart()))return r.set(1);for(e=Math.abs(t);--e;r.set(r.multiply(i)));return t<0?r.set(new Smart.Utilities.BigNumber(1).divide(r)):r}set(t){return t=new Smart.Utilities.BigNumber(t),this._d=t._d,this._f=t._f,this._s=t._s,this}compare(t){if(Smart.Utilities.BigNumber.bigIntSupport){const i=new Smart.Utilities.BigNumber(t)._d;return this._d===i?0:this._d>i?1:-1}let i=this.normalizeOperand(this);t=i.normalizeOperand(t);var e,r,n,s=i,a=i._f,l=new Smart.Utilities.BigNumber(t),_=l._f,u=[-1,1];if(s.isZero()&&l.isZero())return 0;if(s._s!=l._s)return s._s?-1:1;if(a!=_)return u[a>_^s._s];for(a=(n=s._d).length,_=(l=l._d).length,e=-1,r=Math.min(a,_);++e<r;)if(n[e]!=l[e])return u[n[e]>l[e]^s._s];return a!=_?u[a>_^s._s]:0}negate(){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d*BigInt(-1));let t=this.normalizeOperand(this);var i=new Smart.Utilities.BigNumber(t);return i._s^=1,i}abs(){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d<0?this._d*BigInt(-1):this._d);let t=this.normalizeOperand(this);var i=new Smart.Utilities.BigNumber(t);return i._s=0,i}intPart(){if(Smart.Utilities.BigNumber.bigIntSupport)return new Smart.Utilities.BigNumber(this._d);let t=this.normalizeOperand(this);return new Smart.Utilities.BigNumber((t._s?"-":"")+(t._d.slice(0,t._f).join("")||"0"))}valueOf(t,i){return this.normalizeOperand(this).toString(t,i)}toString(t,i,e){function r(t){var i,e,r=new Smart.Utilities.BigNumber(2),s=[];e=void 0===t?n:t;do{i=e.mod(r),s.push(i.toString()),e=e.subtract(i).divide(r).intPart()}while(1===e.compare(new Smart.Utilities.BigNumber(0)));return s.reverse().join("")}let n,s,a;if(Smart.Utilities.BigNumber.bigIntSupport?(n=this,s=Array.isArray(n._d)?(n._s?"-":"")+(n._d.slice(0,n._f).join("")||"0")+(n._f!=n._d.length?"."+n._d.slice(n._f).join(""):""):this._d.toString()):(n=this.normalizeOperand(this),s=(n._s?"-":"")+(n._d.slice(0,n._f).join("")||"0")+(n._f!=n._d.length?"."+n._d.slice(n._f).join(""):"")),void 0===t||10===t)return s;if(n.compare(0)>-1)switch(t){case 2:a=r(),e&&(a=a.padStart(i,"0"));break;case 8:a=function(t){for(var i="";t.length%3!=0;)t="0"+t;for(var e=t.length/3;e>=1;e--){var r=t[3*e-3]+""+t[3*e-2]+t[3*e-1];i=parseInt(r,2).toString(8)+""+i}return i}(r());break;case 16:a=function(t){for(var i="";t.length%4!=0;)t="0"+t;for(var e=t.length/4;e>=1;e--){var r=t[4*e-4]+""+t[4*e-3]+t[4*e-2]+t[4*e-1];i=parseInt(r,2).toString(16)+""+i}return i}(r()).toUpperCase(),e&&(a=a.padStart(i/4,"0"))}else a=function(t,i,e){var r="";for(String.prototype.repeat&&(t="0".repeat(e-t.length)+t);t.length<e;)t="0"+t;for(var n=!0,s="",a=(r=(r=(r=(r=t.replace(/0/g,"a")).replace(/1/g,"b")).replace(/a/g,"1")).replace(/b/g,"0")).length-1;a>=0;a--){var l;"0"===r.charAt(a)?!0===n?(l="1",n=!1):l="0":l=!0===n?"0":"1",s=l+""+s}switch(i){case 2:return s;case 8:var _,u;switch(e){case 8:_=3,u="0";break;case 16:_=6,u="00";break;case 32:_=11,u="0";break;case 64:_=22,u="00"}s=u+s;for(var o="",g=_;g>=1;g--){var m=s[3*g-3]+""+s[3*g-2]+s[3*g-1];o=parseInt(m,2).toString(8)+""+o}return o;case 16:var d;switch(e){case 8:d=2;break;case 16:d=4;break;case 32:d=8;break;case 64:d=16}for(var h="",f=d;f>=1;f--){var p=s[4*f-4]+""+s[4*f-3]+s[4*f-2]+s[4*f-1];h=parseInt(p,2).toString(16)+""+h}return h.toUpperCase()}}(r(n.negate()),t,i);return a}_zeroes(t,i,e){var r=["push","unshift"][e||0];for(++i;--i;t[r](0));return t}round(){if("_rounding"in this)return this;var t,i,e,r,n=Smart.Utilities.BigNumber,s=this.roundType,a=this._d;for(this._rounding=!0;this._f>1&&!a[0];--this._f,a.shift());for(t=this._f,e=a[i=this.precision+t];a.length>t&&!a[a.length-1];a.pop());return r=(this._s?"-":"")+(i-t?"0."+this._zeroes([],i-t-1).join(""):"")+1,a.length>i&&(e&&s!=n.DOWN&&(s==n.UP||(s==n.CEIL?!this._s:s==n.FLOOR?this._s:s==n.HALF_UP?e>=5:s==n.HALF_DOWN?e>5:s==n.HALF_EVEN&&(e>=5&&1&a[i-1])))&&this.add(r),a.splice(i,a.length-i)),delete this._rounding,this}isZero(){return 1===this._d.length&&0===this._d[0]}normalizeOperand(t){return t instanceof Smart.Utilities.BigNumber&&"bigint"==typeof t._d?new Smart.Utilities.BigNumber(t._d.toString()):t}})})();
/***/ }),
/***/ 2754:
/***/ (() => {
Smart.Utilities.Assign("NumericProcessor",class{constructor(t,e){switch(t[e]){case"integer":return new Smart.Utilities.IntegerNumericProcessor(t,e);case"floatingPoint":return new Smart.Utilities.DecimalNumericProcessor(t,e);case"complex":return new Smart.Utilities.ComplexNumericProcessor(t,e)}}}),Smart.Utilities.Assign("BaseNumericProcessor",class{constructor(t,e){const i=this;i.context=t,i._longestLabelSize=0,i.numericFormatProperty=e,i.regexScientificNotation=new RegExp(/^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)(Y|Z|E|P|T|G|M|k|m|u|n|p|f|a|z|y){1}$/),i.regexNoLeadingZero=new RegExp(/^(-)?[.]\d+$/),i.regexLeadingZero=new RegExp(/^[+\-]?(0+)[1-9]+|^[+\-]?(0{2,})[.]|^(0{2,})$/),i.prefixesToPowers={Y:24,Z:21,E:18,P:15,T:12,G:9,M:6,k:3,m:-3,u:-6,n:-9,p:-12,f:-15,a:-18,z:-21,y:-24},window.NIComplex?i.complexConstructor=window.NIComplex:i.complexConstructor=Smart.Utilities.Complex}prepareForValidation(t,e,i){const r=this.context,a=t||void 0!==e;if(i=(i=i.toString()).replace(/\s/g,""),i=r._discardDecimalSeparator(i),this.regexLeadingZero.test(i)){const t=this.regexLeadingZero.exec(i);i=t[1]?i.replace(t[1],""):t[2]?i.replace(t[2],"0"):i.replace(t[3],"0")}this.regexNoLeadingZero.test(i)?i="-"===i.charAt(0)?"-0"+i.slice(1):"0"+i:("integer"===r[this.numericFormatProperty]&&(10===r._radixNumber||a)||"floatingPoint"===r[this.numericFormatProperty])&&this.regexScientificNotation.test(i)&&(i=this.scientificToDecimal(i));let n,l=!1;if("complex"===r[this.numericFormatProperty]&&!1===r._regexSpecial.nonNumericValue.test(i))try{if(r._regexSpecial.exaValue.test(i)){const t=i.indexOf("E"),e=parseFloat(i.slice(0,t))*Math.pow(10,18),r=parseFloat(i.slice(t+1,-1));n=new this.complexConstructor(e,r)}else n=new this.complexConstructor(i);l=!0}catch(t){l=!1}if(!1!==l||!(!a&&!1===r._regex[r._radixNumber].test(i)||a&&!1===r._regex[10].test(i)))return{value:i,enteredComplexNumber:n};r._handleNonNumericValue(t,e,i)}isENotation(t){return new RegExp(/e/i).test(t.toString())}scientificToDecimal(t){const e=this.regexScientificNotation.exec(t),i=e[1],r=e[2];return parseFloat(i)*Math.pow(10,this.prefixesToPowers[r])}_createMeasureLabel(){const t=this.context,e=document.createElement("div");return e.className="smart-label",e.style.position="absolute",e.style.visibility="hidden","far"!==t.scalePosition?t._measureLabelScale=t.$.scaleNear:t._measureLabelScale=t.$.scaleFar,t._measureLabelScale.appendChild(e),e}_addMajorTickAndLabel(t,e,i,r,a){const n=this.context,l=n._settings.leftOrTop,o=this.valueToPx(r);let s="",c="";if(parseInt(o)>parseInt(n._measurements.trackLength))return{tick:s,label:c};if(n.logarithmicScale&&(t=n._formatLabel(Math.pow(10,r))),"smart-tank"===n.nodeName.toLowerCase()||n._intervalHasChanged){let e=n._tickIntervalHandler.labelsSize;if(a){n._labelDummy.innerHTML=t;let a=this.valueToPx(r),l=this.valueToPx(n._drawMax),o=this.valueToPx(n._drawMin),s=n._labelDummy[n._settings.size],c="vertical"===n.orientation?n._labelDummy.offsetWidth:n._labelDummy.offsetHeight,m=(s+e.minLabelSize)/2,u=(s+e.maxLabelSize)/2;i=n._normalLayout?a+u<l&&a-m>o:a-u>l&&a+m<o,c>this._longestLabelSize&&(this._longestLabelSize=c)}else this._longestLabelSize=Math.max(e.minLabelOtherSize,e.maxLabelOtherSize,this._longestLabelSize)}return n._tickValues.push(r),s='<div style="'+l+": "+o+'px;" class="smart-tick"></div>',!1!==i&&(void 0===e&&(n._labelDummy.innerHTML=t,e=n._labelDummy[n._settings.size]),c+='<div class="smart-label'+(a?" smart-label-middle":"")+'" style="'+l+": "+(o-e/2)+'px;">'+t+"</div>"),{tick:s,label:c}}getWordLength(t){switch(this.context._unsigned="u"===t.charAt(0),t){case"int8":case"uint8":return 8;case"int16":case"uint16":return 16;case"int32":case"uint32":return 32;case"int64":case"uint64":return 64}}getAngleByValue(t,e,i){const r=this.context;!1!==e&&r.logarithmicScale&&(t=Math.log10(t));const a=(t-r._drawMin)*r._angleRangeCoefficient;let n;return n=void 0===r.inverted||!r.inverted&&!r.rightToLeft||r.rightToLeft&&r.inverted?r.endAngle-a:r.startAngle+a,i?n:n*Math.PI/180+Math.PI/2}getValueByAngle(t,e){const i=this.context;let r,a,n;for(void 0===i.inverted||!i.inverted&&!i.rightToLeft||i.rightToLeft&&i.inverted?(r=i.endAngle,a=t):(r=t,a=i._normalizedStartAngle);r<a;)r+=360;if(n=(r-a)/i._angleDifference*i._range+parseFloat(i._drawMin),i.logarithmicScale){if(i.customInterval)return parseFloat(Math.pow(10,this.getCoercedValue(n,!0)).toFixed(12));n=Math.pow(10,n)}return e&&!i.coerce?Math.round(n):(n=this.createDescriptor(n,void 0,!0,!0),this.getCoercedValue(n,!1))}updateGaugeValue(t){const e=this.context,i=e.value;e.value=t,e._drawValue=e.logarithmicScale?Math.log10(t).toString():t,e._number=this.createDescriptor(e.value),e.$.digitalDisplay.value=t,e.$.fireEvent("change",{value:t,oldValue:i}),e._setAriaValue("valuenow"),delete e._valueBeforeCoercion}validateColorRange(t){const e=this.context;return Math.min(Math.max(t,e.min),e.max)}getActualValue(t){return this.context.logarithmicScale?Math.pow(10,t):t}drawGaugeLogarithmicScaleMinorTicks(t,e,i){const r=this.context;let a;e instanceof Smart.Utilities.BigNumber&&(e=parseFloat(e.toString()));for(let e in t)if(a=e,e>=0&&e%1==0)break;for(let t=parseFloat(a);t<r._drawMax;t+=e)for(let a=2;a<=9;a++){const n=a*Math.pow(10,t+e-1);n<r.max&&i(n)}for(let t=parseFloat(a);t>r._drawMin;t-=e)for(let e=2;e<=9;e++){const a=e*Math.pow(10,t-1);a>r.min&&i(a)}}_getAngleDifference(t,e){const i=Math.abs(e-t)%360;return i>180?360-i:i}addCustomTicks(){const t=this,e=t.context,i=!e.logarithmicScale;let r="",a="";function n(n){const l=e.customTicks[n],o=i?t.createDescriptor(l):Math.log10(l),s=n>0&&n<e.customTicks.length-1,c=t._addMajorTickAndLabel(e._formatLabel(l),void 0,!0,o,s);r+=c.tick,a+=c.label}if(t._longestLabelSize=0,e._tickValues=[],e._labelDummy=t._createMeasureLabel(),e._normalLayout)for(let t=0;t<e.customTicks.length;t++)n(t);else for(let t=e.customTicks.length-1;t>=0;t--)n(t);"smart-tank"===e.nodeName.toLowerCase()&&e._updateScaleWidth(t._longestLabelSize),e._appendTicksAndLabelsToScales(r,a)}addGaugeCustomTicks(){const t=this,e=t.context,i=e._distance,r=e._measurements.radius-i.majorTickDistance;let a,n;function l(i){const r=e.customTicks[i],l=t.createDescriptor(r),o=t.getAngleByValue(l,!0),s=i>0&&i<e.customTicks.length-1;a(o),n(o,r,s)}a="none"!==e.ticksVisibility&&!1!==e._plotTicks?function(t){e._drawTick(t,r,"major")}:function(){},n="none"!==e.labelsVisibility&&!1!==e._plotLabels?function(t,r,a){e._drawLabel(t,r,i.labelDistance,a)}:function(){};for(let t=e.customTicks.length-1;t>=0;t--)l(t)}}),Smart.Utilities.Assign("IntegerNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e);const i=this;i.context=t,i.defaultMins={int8:"-128",uint8:"0",int16:"-32768",uint16:"0",int32:"-2147483648",uint32:"0",int64:"-9223372036854775808",uint64:"0"},i.defaultMaxs={int8:"127",uint8:"255",int16:"32767",uint16:"65535",int32:"2147483647",uint32:"4294967295",int64:"9223372036854775807",uint64:"18446744073709551615"}}createDescriptor(t,e,i,r,a){const n=this.context;let l;if(t.constructor!==Smart.Utilities.BigNumber){let i=!a&&n._radixNumber?n._radixNumber:10;10===i&&e&&t.constructor!==Smart.Utilities.BigNumber&&this.isENotation(t)&&(t=Smart.Utilities.BigNumber.bigIntSupport?new Smart.Utilities.BigNumber(Math.round(t)):new Smart.Utilities.NumberRenderer(t).largeExponentialToDecimal()),l=n._toBigNumberDecimal?n._toBigNumberDecimal(t.toString(i,n._wordLengthNumber),i):new Smart.Utilities.BigNumber(t)}else l=new Smart.Utilities.BigNumber(t);return i&&(n._unsigned&&-1===l.compare(0)&&(l=l.set(0)),r&&(l=this.validate(l,n._minObject,n._maxObject)),l=this.round(l)),l}round(t){const e=this.context;if(t instanceof window.Smart.Utilities.BigNumber&&"bigint"==typeof t._d)return t;if(t instanceof window.Smart.Utilities.BigNumber==0||!e._wordLengthNumber||e._wordLengthNumber<64)return new Smart.Utilities.BigNumber(Math.round(t.toString()));const i=t.mod(1);return 1===i._d.length&&0===i._d[0]||((t=t.intPart())._s?(i._d[1]>5||5===i._d[1]&&i._d[2])&&(t=t.add(-1)):i._d[1]>4&&(t=t.add(1))),t}validate(t,e,i){let r;return r=-1===t.compare(e)?e:1===t.compare(i)?i:t,r}validateMinMax(t,e){const i=this.context;let r=this.defaultMins[i.wordLength],a=new Smart.Utilities.BigNumber(r),n=this.defaultMaxs[i.wordLength],l=new Smart.Utilities.BigNumber(n),o="date"!==i.mode;if(void 0===i._numberRenderer&&(i._numberRenderer=new Smart.Utilities.NumberRenderer),t&&o){null!==i.min&&(i.min=i.min.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.min)&&(i.min=this.scientificToDecimal(i.min)));let t=this.round(new Smart.Utilities.BigNumber(i.min));null===i.min||i._minIsNull&&i._initialized||!(t.compare(a)>=0)?(i._minIsNull=!0,i.min=r,i._minObject=a):i._minObject=t}if(e&&o){null!==i.max&&(i.max=i.max.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.max)&&(i.max=this.scientificToDecimal(i.max)));let t=this.round(new Smart.Utilities.BigNumber(i.max));null===i.max||i._maxIsNull&&i._initialized||!(t.compare(l)<=0)?(i._maxIsNull=!0,i.max=n,i._maxObject=l):i._maxObject=t}o||(i._minObject=new Smart.Utilities.BigNumber(i.min),i._maxObject=new Smart.Utilities.BigNumber(i.max)),this.compare(i._minObject,i._maxObject)||(i._minObject=a,i._maxObject=l,i._drawMin=i.logarithmicScale?0:r,i._drawMax=i.logarithmicScale?10:n,i.min=r,i.max=n),o||(i._minDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.min),i._maxDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.max))}valueToPx(t){const e=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const i=this.context,r=new Smart.Utilities.BigNumber(i._measurements.trackLength).divide(new Smart.Utilities.BigNumber(i._range));let a;if(i._normalLayout){const e=i._drawMin instanceof Smart.Utilities.BigNumber?i._drawMin:new Smart.Utilities.BigNumber(i._drawMin);t=new Smart.Utilities.BigNumber(t),a=parseFloat(r.multiply(t.subtract(e)).toString())}else{const e=i._drawMax instanceof Smart.Utilities.BigNumber?i._drawMax:new Smart.Utilities.BigNumber(i._drawMax);a=parseFloat(this.round(e.subtract(t).multiply(r)).toString())}return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=e,a}pxToValue(t){const e=this.context,i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;let r;if(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,r=e._normalLayout?e._valuePerPx.multiply(t-e._trackStart):e._valuePerPx.multiply(e._trackEnd-t),r=this.round(r).toString(),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,e.logarithmicScale){let t=parseFloat(r)+parseFloat(e._drawMin);return new Smart.Utilities.BigNumber(Math.round(Math.pow(10,t)))}return this.createDescriptor(e._minObject.add(r),!1,!0,!0)}compare(t,e,i){if((null===t||null===e)&&t!==e)return!0;t.constructor!==Smart.Utilities.BigNumber&&(t=new Smart.Utilities.BigNumber(t));const r=t.compare(e);return!0!==i?0!==r:r}incrementDecrement(t,e,i){const r=this.context;let a;if(t.constructor!==Smart.Utilities.BigNumber&&(t=new Smart.Utilities.BigNumber(t)),"add"===e){if(a=t.add(i),void 0!==r._drawMax)return a.compare(r._drawMax)>0?new Smart.Utilities.BigNumber(r._drawMax):a}else if(a=t.subtract(i),void 0!==r._drawMin)return a.compare(r._drawMin)<0?new Smart.Utilities.BigNumber(r._drawMin):a;return a}render(t,e){const i=this.context;if(!i.scientificNotation&&!0===e)return new Smart.Utilities.NumberRenderer(new Smart.Utilities.BigNumber(t)).bigNumberToExponent(i.significantDigits);let r=t;return i.scientificNotation&&!0===e?r=new Smart.Utilities.NumberRenderer(r).toScientific(i.significantDigits,i.precisionDigits):"string"!=typeof t&&(r=t.toString(i._radixNumber,i._wordLengthNumber,i.leadingZeros)),r}addTicksAndLabels(){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const e=this.context,i=e._measurements.trackLength,r=e._normalLayout,a=e._majorTicksInterval,n=this.round(new Smart.Utilities.BigNumber(e._range).divide(a)),l=i/n,o=new Smart.Utilities.BigNumber(e._drawMin),s=new Smart.Utilities.BigNumber(e._drawMax);let c,m,u,g,d,p,h,b,f,_="",S="";e._tickValues=[],this._longestLabelSize=0,r?(c=o,m=a.add(c.subtract(c.mod(a))),u=m.subtract(c),d=e._formatLabel(o),p=e._tickIntervalHandler.labelsSize.minLabelSize,g=s,h=e._formatLabel(s),b=e._tickIntervalHandler.labelsSize.maxLabelSize):(c=s,m=c.subtract(c.mod(a)),u=c.subtract(m),d=e._formatLabel(s),p=e._tickIntervalHandler.labelsSize.maxLabelSize,g=o,h=e._formatLabel(o),b=e._tickIntervalHandler.labelsSize.minLabelSize),e._labelDummy=this._createMeasureLabel(),f=this._addMajorTickAndLabel(d,p,!0,c),_+=f.tick,S+=f.label;const x=u.divide(a).multiply(l);if(0!==m.compare(e.max)&&x.compare(i)<0){const t=e._formatLabel(m.toString()),i=x.compare(p)>0;f=this._addMajorTickAndLabel(t,void 0,i,m,!0),_+=f.tick,S+=f.label}f=this.addMiddleMajorTicks(n,l,x,u,r,a),_+=f.tick,S+=f.label,f=this._addMajorTickAndLabel(h,b,!0,g),_+=f.tick,S+=f.label,"date"!==e.mode&&(_+=this.addMinorTicks(r)),e._measureLabelScale.removeChild(e._labelDummy),delete e._labelDummy,delete e._measureLabelScale,"smart-tank"===e.nodeName.toLowerCase()&&e._updateScaleWidth(this._longestLabelSize),e._appendTicksAndLabelsToScales(_,S),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}addMiddleMajorTicks(t,e,i,r,a,n){const l=this.context;let o,s="",c="";for(let m=1;m<t;m++){let u,g=i.add(m*e);if(a?u=n.multiply(m).add(r.add(new Smart.Utilities.BigNumber(l._drawMin))):(u=new Smart.Utilities.BigNumber(l._drawMax).subtract(r).subtract(n.multiply(m)),m===t-1&&0===u.compare(0)&&(l._numberRenderer.numericValue=l._tickIntervalHandler.nearestPowerOfTen,o=l._numberRenderer.bigNumberToExponent(1))),0!==u.compare(l._drawMax)){let i=l._formatLabel(u.toString()),r=!0;l._labelDummy.innerHTML=o||i;let a=l._labelDummy[l._settings.size];g.add(a).compare(t*e)>=0&&(r=!1);const n=this._addMajorTickAndLabel(i,void 0,r,u,!0);s+=n.tick,c+=n.label}}return{tick:s,label:c}}addMinorTicks(t){function e(t){-1===r.indexOf(t)&&t%n==0&&(m+='<div style="'+l+": "+i._numericProcessor.valueToPx(t)+'px;" class="smart-tick smart-tick-minor"></div>')}const i=this.context,r=i._tickValues,a=i._tickIntervalHandler.nearestPowerOfTen,n=i._minorTicksInterval,l=i._settings.leftOrTop;let o,s,c,m="";if(t?(o=r[0],s=r[1],c=r[r.length-1]):(o=r[r.length-1],s=r[r.length-2],c=r[0]),i.logarithmicScale)!function(){let t=i._measurements.trackLength/r.length,e=.1;t<20?e=1:t>=20&&t<40?e=s-o>1?1:.5:t>=40&&t<80&&(e=.2);let a=Math.floor(i._drawMax),n=i._drawMax-a,c=i._drawMax-i._drawMin>r.length;for(let t=i._drawMax;t>0;t-=1){let r=n>0?Math.pow(10,t-n+1):Math.pow(10,t),a=r*e;for(let t=r;t>0;t-=a)if(t<i.max&&t>i.min){let e=new Smart.Utilities.BigNumber(Math.log10(t));(e%1==0&&c||!c)&&(m+='<div style="'+l+": "+i._numericProcessor.valueToPx(e)+'px;" class="smart-tick smart-tick-minor"></div>')}}}();else{for(let t=s;o.compare(t)<0;t=t.subtract(a))e(t);for(let t=s.add(a);c.compare(t)>0;t=t.add(a))e(t)}return m}validateCustomTicks(){const t=this.context,e="date"!==t.mode;let i=[];for(let r=0;r<t.customTicks.length;r++){let a=t.customTicks[r];e?a=this.createDescriptor(a,!1,!0):void 0===a._d&&(a=Smart.Utilities.DateTime.validateDate(a).getTimeStamp()),a.compare(t._minObject)>=0&&a.compare(t._maxObject)<=0&&i.push(a)}if(i.sort((function(t,e){return t.compare(e)})),e){for(let t=0;t<i.length;t++)i[t]=i[t].toString();i=i.filter((function(t,e,i){return!e||t!==i[e-1]}))}t.customTicks=i.slice(0)}addGaugeTicksAndLabels(){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const e=this.context,i=this,r=Math.max(e._tickIntervalHandler.labelsSize.minLabelSize,e._tickIntervalHandler.labelsSize.maxLabelSize),a=e._majorTicksInterval,n=e._minorTicksInterval,l={},o=e._distance,s=e._measurements.radius,c=s-o.majorTickDistance,m=s-o.minorTickDistance,u=new Smart.Utilities.BigNumber(e._drawMin),g=new Smart.Utilities.BigNumber(e._drawMax);let d,p,h,b,f,_;"none"!==e.ticksVisibility&&!1!==e._plotTicks?(d=function(t){e._drawTick(t,c,"major")},p=function(t){e._drawTick(i.getAngleByValue(t,!0),m,"minor")}):(d=function(){},p=function(){}),h="none"!==e.labelsVisibility&&!1!==e._plotLabels?function(t,i,r){e._drawLabel(t,i,o.labelDistance,r)}:function(){},void 0===e.inverted||!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(f=e.endAngle,_=e.startAngle):(f=e.startAngle,_=e.endAngle),b=i.getAngleByValue(u,!1),d(b),l[e._drawMin.toString()]=!0,h(b,e.min,!1);let S,x,v=u.subtract(u.mod(a));-1!==u.compare(0)&&(v=v.add(a));for(let t=new Smart.Utilities.BigNumber(v);-1!==t.compare(u);t=t.subtract(n))S=t;for(b=i.getAngleByValue(v,!1),d(b),l[v.toString()]=!0,2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(f,i.getAngleByValue(v,!1,!0))/360)>r&&h(b,this.getActualValue(v),-1===v.compare(g)),x=v.add(a);-1===x.compare(g.subtract(a));x=x.add(a))b=i.getAngleByValue(x,!1),d(b),l[x.toString()]=!0,h(b,this.getActualValue(x),!0);if(void 0===l[x.toString()]&&1!==x.compare(g)&&(b=i.getAngleByValue(x,!1),d(b),l[x.toString()]=!0,2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(_,i.getAngleByValue(x,!1,!0))/360)>=r&&h(b,this.getActualValue(x),!0),e._normalizedStartAngle!==e.endAngle&&(b=i.getAngleByValue(g,!1),d(b),2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(_,f)/360)>=r&&h(b,e.max,!1))),"date"!==e.mode){if(e.logarithmicScale)this.drawGaugeLogarithmicScaleMinorTicks(l,a,p);else for(let t=S;-1===t.compare(g);t=t.add(n))l[t.toString()]||p(t);Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}else Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}updateToolTipAndValue(t,e,i){const r=this.context,a=r.logarithmicScale;r._updateTooltipValue(t.toString()),a&&(t=parseFloat(Math.pow(10,parseFloat(t)).toFixed(11)));const n=(t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t)).toString();r._number=t,r._drawValue=a?Math.log10(n):t,0!==t.compare(e)&&i&&("numeric"===r.mode?(r.value=n,t=n):(e=r._valueDate,r._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(n),r.value=t,t=r._valueDate),r._programmaticValueIsSet||r.$.fireEvent("change",{value:t,oldValue:e}),r.$.hiddenInput&&(r.$.hiddenInput.value=t),r._setAriaValue("valuenow"))}validateInterval(t){const e=this.context,i=e._maxObject.subtract(e._minObject);e._validInterval=new Smart.Utilities.BigNumber(t),e._validInterval=this.round(e._validInterval),e._validInterval.compare(0)<=0&&(e._validInterval=new Smart.Utilities.BigNumber(1)),1===e._validInterval.compare(i)&&(e._validInterval=i),e.interval=e._validInterval.toString()}getCoercedValue(t,e,i){const r=this.context;if(!r.coerce)return t;const a=!r.logarithmicScale;let n,l;if(t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t),r.customInterval){const e=r.customTicks;if(0===e.length)return t;let l,o;if(a||i){n=r._minObject,l=n.subtract(t).abs(),o=n;for(let i=0;i<e.length;i++){const r=this.createDescriptor(e[i]),a=r.subtract(t).abs();-1===a.compare(l)&&(l=a,o=r)}}else{n=r._drawMin,l=Math.abs(n-parseFloat(t.toString())),o=n;for(let i=0;i<e.length;i++){const r=Math.log10(e[i]),a=Math.abs(r-t);a<l&&(l=a,o=r)}o=new Smart.Utilities.BigNumber(o)}return o}let o=r._validInterval;if("date"===r.mode){if("addYears"===r._dateIncrementMethod)return this.coerceYear(t);if("addMonths"===r._dateIncrementMethod)return this.coerceMonth(t);o=new Smart.Utilities.BigNumber(r._dateIntervalNumber).multiply(o)}!1!==e?(n=new Smart.Utilities.BigNumber(r._drawMin),l=new Smart.Utilities.BigNumber(r._drawMax)):(n=new Smart.Utilities.BigNumber(r.min),l=new Smart.Utilities.BigNumber(r.max));let s=t.subtract(n),c=s.mod(o);if(0===c.compare(0))return t;let m=s.subtract(c),u=m.add(o);if(s.subtract(m).abs().compare(s.subtract(u).abs())<0)return m.add(n);{const t=u.add(n);return t.compare(l)<=0?t:m.add(n)}}coerceMonth(t){const e=this.context,i=parseFloat(e._validInterval),r=Smart.Utilities.DateTime.fromFullTimeStamp(t),a=r.year(),n=r.month(),l=r.day(),o=e._minDate.year(),s=e._minDate.month(),c=12*(e._maxDate.year()-o-1)+12-s+e._maxDate.month();let m=12*(a-1-o)+(12-s)+n;1===i&&(-1!==[1,3,5,7,8,10,12].indexOf(n)?(l>16||16===l&&r.hour()>11)&&m++:2===n?r.isLeapYear(a)?(l>15||15===l&&r.hour()>11)&&m++:l>14&&m++:l>15&&m++),m=this.getCoercedTimePart(0,c,m,i);let u=e._minDate.addMonths(m,!0);return 1===u.compare(e._maxDate)&&(u=e._minDate.addMonths(m-i,!0)),e._drawValue=new Smart.Utilities.BigNumber(u.getTimeStamp()),e._drawValue}coerceYear(t){const e=this.context,i=parseFloat(e._validInterval),r=Smart.Utilities.DateTime.fromFullTimeStamp(t),a=e._maxDate.year(),n=Smart.Utilities.DateTime.getConstructorParameters(e._minDate);let l=r.year();r.month()>6&&l++;let o=this.getCoercedTimePart(e._minDate.year(),a,l,i);o>a&&(o-=i),n[0]=o,n.unshift(null);const s=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,n));return e._drawValue=new Smart.Utilities.BigNumber(s.getTimeStamp()),e._drawValue}getCoercedTimePart(t,e,i,r){let a=i-t,n=a%r;if(0===n)return i;let l=parseFloat((a-n).toFixed(12)),o=l+r;if(e-t<=r)return i>=t+(e-t)/2?e:t;if(Math.abs(a-l)<Math.abs(a-o))return l+t;{const i=o+t;return i>e?l+t:i}}updateValue(t){const e=this.context;t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t);const i=this.validate(t,e._minObject,e._maxObject);let r,a,n=e.value;e._number=i,e._drawValue=e.logarithmicScale?Math.log10(i):i,"numeric"===e.mode?(r=t.toString(),e.value=r,a=this.compare(t,n)):(n=Smart.Utilities.DateTime.fromFullTimeStamp(n),e._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(t),e.value=t,r=t=e._valueDate,a=0!==t.compare(n)),e._programmaticValueIsSet||!a&&!e._scaleTypeChangedFlag||e.$.fireEvent("change",{value:r,oldValue:n}),e.$.hiddenInput&&(e.$.hiddenInput.value=t),e._setAriaValue("valuenow"),e._moveThumbBasedOnValue(e._drawValue)}getValuePerPx(t,e){const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const r=new Smart.Utilities.BigNumber(t).divide(e);return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,r}restrictValue(t){t[1].constructor===Smart.Utilities.BigNumber?-1===t[1].compare(t[0])&&t[1].set(t[0]):t[1]<t[0]&&(t[1]=t[0])}getAngleByValue(t,e,i){const r=this.context,a=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;if(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,r._wordLengthNumber<64)return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=a,super.getAngleByValue(parseFloat(t.toString()),e,i);t instanceof Smart.Utilities.BigNumber==0&&(t=new Smart.Utilities.BigNumber(t)),!1!==e&&r.logarithmicScale&&(t=new Smart.Utilities.BigNumber(Math.log10(t.toString())));const n=t.subtract(r._drawMin).multiply(r._angleRangeCoefficient);let l;return l=void 0===r.inverted||!r.inverted&&!r.rightToLeft||r.rightToLeft&&r.inverted?n.multiply(-1).add(r.endAngle):n.add(r.startAngle),l=parseFloat(l.toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=a,i?l:l*Math.PI/180+Math.PI/2}getValueByAngle(t){const e=this.context;if(e._wordLengthNumber<64)return super.getValueByAngle(t,!0);const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;let r,a,n,l;for(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,void 0===e.inverted||!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(r=e.endAngle,a=t):(r=t,a=e._normalizedStartAngle);r<a;)r+=360;return n=new Smart.Utilities.BigNumber((r-a)/e._angleDifference).multiply(e._range).add(e._drawMin),e.logarithmicScale&&(n=new Smart.Utilities.BigNumber(Math.pow(10,n.toString()))),l=e.coerce?this.getCoercedValue(n,!1):this.round(n),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,new Smart.Utilities.BigNumber(l)}updateGaugeValue(t){if(t instanceof Smart.Utilities.BigNumber==0)return super.updateGaugeValue(t);const e=this.context,i=e._getEventValue();"numeric"===e.mode?(e.value=t.toString(),e.$.digitalDisplay.value=e.value):(e._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(t),e.value=t),e._drawValue=e.logarithmicScale?Math.log10(e.value).toString():e.value,e._number=t,e.$.fireEvent("change",{value:e._getEventValue(),oldValue:i}),e._setAriaValue("valuenow")}validateColorRange(t){const e=this.context;if(e._wordLengthNumber<64)return super.validateColorRange(t);t="numeric"===e.mode?new Smart.Utilities.BigNumber(t):(t=Smart.Utilities.DateTime.validateDate(t)).getTimeStamp();const i=new Smart.Utilities.BigNumber(e.min),r=new Smart.Utilities.BigNumber(e.max);return-1===t.compare(i)&&(t=i),1===t.compare(r)&&(t=r),t}lockRotation(t,e){const i=this.context;if(e instanceof Smart.Utilities.BigNumber==0&&(e=new Smart.Utilities.BigNumber(e)),t&&-1===e.compare(i._number)){if(i._lockCW=!0,-1===e.compare(i._maxObject))return new Smart.Utilities.BigNumber(i._maxObject)}else if(!t&&1===e.compare(i._number)&&(i._lockCCW=!0,1===e.compare(i._minObject)))return new Smart.Utilities.BigNumber(i._minObject)}getAngleRangeCoefficient(){const t=this.context,e=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,t._angleRangeCoefficient=new Smart.Utilities.BigNumber(t._angleDifference).divide(t._range),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=e}}),Smart.Utilities.Assign("DecimalNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e),this.context=t}getPreciseModulo(t,e,i){const r=t>=0?1:-1;if(t=Math.abs(t),e=Math.abs(e),void 0===i){const i=t.toExponential(),a=e.toExponential(),n=parseInt(i.slice(i.indexOf("e")+1),10),l=parseInt(a.slice(a.indexOf("e")+1),10),o=n<0?Math.abs(n):0,s=l<0?Math.abs(l):0,c=Math.max(o,s);if(this.roundCoefficient=c,t<e)return r*t;if(t===e)return 0;if((t<-1||t>1)&&(e<-1||e>1||1===e)){if(t%1==0&&e%1==0)return r*(t%e);{const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const a=r*parseFloat(new Smart.Utilities.BigNumber(t).mod(e).toString());return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,a}}const m=Math.pow(10,c);return r*(t*m%(e*m)/m)}return r*(Math.round(t*i)%Math.round(e*i))}createDescriptor(t,e,i,r){let a=parseFloat(t);return r&&(a=this.validate(a,this.context._minObject,this.context._maxObject)),a}round(t){return Math.round(t)}validate(t,e,i){let r;return r=t<e?e:t>i?i:t,r}validateMinMax(t,e){const i=this.context,r=void 0!==i._regexSpecial&&i._regexSpecial.inf.test(i.min),a=void 0!==i._regexSpecial&&i._regexSpecial.inf.test(i.max);t&&(null===i.min||r?(i.min=-1/0,i._minObject=-1/0):(i.min=i.min.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.min)&&(i.min=this.scientificToDecimal(i.min)),i._minObject=i._discardDecimalSeparator(i.min))),e&&(null===i.max||a?(i.max=1/0,i._maxObject=1/0):(i.max=i.max.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.max)&&(i.max=this.scientificToDecimal(i.max)),i._maxObject=i._discardDecimalSeparator(i.max))),this.compare(i._minObject,i._maxObject)||(i._maxObject=parseFloat(i._maxObject)+1,i.max=i._maxObject)}valueToPx(t){const e=this.context,i=e._measurements.trackLength/e._range;let r;return r=e._normalLayout?i*(t-e._drawMin):i*(e._drawMax-t),Math.round(r)}pxToValue(t){const e=this.context;let i;if(i=e._normalLayout?(t-e._trackStart)*e._valuePerPx:(e._trackEnd-t)*e._valuePerPx,e.logarithmicScale){const t=i+parseFloat(e._drawMin);return Math.pow(10,t)}return this.validate(i+e._minObject,e._minObject,e._maxObject)}compare(t,e,i){return t=parseFloat(t),e=parseFloat(e),!0!==i?t!==e:t<e?-1:t>e?1:0}incrementDecrement(t,e,i){const r=this.context;let a;if("add"===e){if(a=parseFloat(t)+parseFloat(i),void 0!==r._drawMax)return a>parseFloat(r._drawMax)?r._drawMax:a}else if(a=parseFloat(t)-parseFloat(i),void 0!==r._drawMin)return a<parseFloat(r._drawMin)?r._drawMin:a;return a}render(t){const e=this.context;if(void 0!==e._regexSpecial&&e._regexSpecial.nonNumericValue.test(t))return t;{const i=new Smart.Utilities.NumberRenderer(t);return e.scientificNotation?i.toScientific(e.significantDigits,e.precisionDigits):i.toDigits(e.significantDigits,e.precisionDigits)}}addTicksAndLabels(){const t=this.context,e=t._measurements.trackLength,i=t._normalLayout,r=t._majorTicksInterval,a=Math.round(t._range/parseFloat(r.toString())),n=e/a,l=parseFloat(t._drawMin),o=parseFloat(t._drawMax);let s,c,m,u,g,d,p,h,b,f="",_="";t._tickValues=[],this._longestLabelSize=0,i?(s=l,c=t.logarithmicScale&&l<0&&-1!==l?parseFloat(s-this.getPreciseModulo(s,r)):parseFloat(s-this.getPreciseModulo(s,r)+parseFloat(r)),m=c-s,g=t._formatLabel(l),d=t._tickIntervalHandler.labelsSize.minLabelSize,u=o,p=t._formatLabel(o),h=t._tickIntervalHandler.labelsSize.maxLabelSize):(s=o,c=parseFloat(s-this.getPreciseModulo(s,r)),m=s-c,g=t._formatLabel(o),d=t._tickIntervalHandler.labelsSize.maxLabelSize,u=l,p=t._formatLabel(l),h=t._tickIntervalHandler.labelsSize.minLabelSize),t._labelDummy=this._createMeasureLabel(),b=this._addMajorTickAndLabel(g,d,!0,s),f+=b.tick,_+=b.label;const S=m/r*n;if(c.toString()!==t._drawMax.toString()&&S<e){const e=t._formatLabel(c.toString()),i=d<S;b=this._addMajorTickAndLabel(e,void 0,i,c,!0),f+=b.tick,_+=b.label}b=this.addMiddleMajorTicks(a,n,S,m,i,r),f+=b.tick,_+=b.label,b=this._addMajorTickAndLabel(p,h,!0,u),f+=b.tick,_+=b.label,f+=this.addMinorTicks(i),t._measureLabelScale.removeChild(t._labelDummy),delete t._labelDummy,delete t._measureLabelScale,"smart-tank"===t.nodeName.toLowerCase()&&t._updateScaleWidth(this._longestLabelSize),t._appendTicksAndLabelsToScales(f,_)}addMiddleMajorTicks(t,e,i,r,a,n){const l=this.context;let o="",s="";for(let c=1;c<t;c++){let m,u=c*e+i;if(m=a?parseFloat(l._drawMin)+n*c+r:parseFloat(l._drawMax)-n*c-r,m.toString()!==l._drawMax.toString()){let i=l._formatLabel(m.toString()),r=!0;l._labelDummy.innerHTML=i,u+l._labelDummy[l._settings.size]>=t*e&&(r=!1);const a=this._addMajorTickAndLabel(i,void 0,r,m,!0);o+=a.tick,s+=a.label}}return{tick:o,label:s}}addMinorTicks(t){function e(t){return parseFloat(t.toFixed(o))}function i(t){-1===a.indexOf(t)&&0===r._numericProcessor.getPreciseModulo(t,l,s)&&(d+='<div style="'+c+": "+r._numericProcessor.valueToPx(t)+'px;" class="smart-tick smart-tick-minor"></div>')}const r=this.context,a=r._tickValues,n=r._tickIntervalHandler.nearestPowerOfTen,l=r._minorTicksInterval,o=Math.log10(n)<0?Math.round(Math.abs(Math.log10(n))):0,s=Math.pow(10,o),c=r._settings.leftOrTop;let m,u,g,d="";if(t?(m=a[0],u=a[1],g=a[a.length-1]):(m=a[a.length-1],u=a[a.length-2],g=a[0]),r.logarithmicScale)!function(){let t=r._measurements.trackLength/a.length,e=.1;t<20?e=1:t>=20&&t<40?e=u-m>1?1:.5:t>=40&&t<80&&(e=.2);let i=Math.floor(r._drawMax),n=r._drawMax-i,l=r._drawMax-r._drawMin>a.length;for(let t=r._drawMax;t>r._drawMin-1;t-=1){let i=n>0?Math.pow(10,t-n+1):Math.pow(10,t),a=i*e;for(let t=i;t>0;t-=a)if(t<r.max&&t>r.min){let e=new Smart.Utilities.BigNumber(Math.log10(t));(e%1==0&&l||!l)&&(d+='<div style="'+c+": "+r._numericProcessor.valueToPx(e)+'px;" class="smart-tick smart-tick-minor"></div>')}}}();else{for(let t=u;t>m;t=e(t-n))i(t);for(let t=e(u+n);t<g;t=e(t+n))i(t)}return d}validateCustomTicks(){const t=this.context;let e=[];for(let i=0;i<t.customTicks.length;i++){const r=t.customTicks[i],a=this.createDescriptor(r);a>=t._minObject&&a<=t._maxObject&&e.push(a.toString())}e.sort((function(t,e){return t-e})),e=e.filter((function(t,e,i){return!e||t!==i[e-1]})),t.customTicks=e.slice(0)}addGaugeTicksAndLabels(){const t=this.context,e=this,i=Math.max(t._tickIntervalHandler.labelsSize.minLabelSize,t._tickIntervalHandler.labelsSize.maxLabelSize),r=t._majorTicksInterval,a=t._minorTicksInterval,n={},l=t._distance,o=t._measurements.radius,s=o-l.majorTickDistance,c=o-l.minorTickDistance;let m,u,g,d,p,h;"none"!==t.ticksVisibility&&!1!==t._plotTicks?(m=function(e){t._drawTick(e,s,"major")},u=function(i){t._drawTick(e.getAngleByValue(i,!0),c,"minor")}):(m=function(){},u=function(){}),g="none"!==t.labelsVisibility&&!1!==t._plotLabels?function(e,i,r){t._drawLabel(e,i,l.labelDistance,r)}:function(){},void 0===t.inverted||!t.inverted&&!t.rightToLeft||t.rightToLeft&&t.inverted?(p=t.endAngle,h=t.startAngle):(p=t.startAngle,h=t.endAngle),d=e.getAngleByValue(t._drawMin,!1),m(d),n[t._drawMin]=!0,g(d,t.min,!1);let b,f,_=t._drawMin-e.getPreciseModulo(t._drawMin,r);t._drawMin>=0&&(_+=r);for(let e=_;e>=t._drawMin;e-=a)b=e;for(d=e.getAngleByValue(_,!1),m(d),n[_]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(p,e.getAngleByValue(_,!1,!0))/360)>i&&g(d,this.getActualValue(_),_<t._drawMax),f=_+r;f<t._drawMax-r;f+=r)d=e.getAngleByValue(f,!1),m(d),n[f]=!0,g(d,this.getActualValue(f),!0);if(void 0===n[f]&&f<=t._drawMax&&(d=e.getAngleByValue(f,!1),m(d),n[f]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(h,e.getAngleByValue(f,!1,!0))/360)>=i&&g(d,this.getActualValue(f),!0),t._normalizedStartAngle!==t.endAngle&&(d=e.getAngleByValue(t._drawMax,!1),m(d),n[t._drawMax]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(h,p)/360)>=i&&g(d,t.max,!1))),t.logarithmicScale)this.drawGaugeLogarithmicScaleMinorTicks(n,r,u);else for(let e=b;e<t._drawMax;e+=a)n[e]||u(e)}updateToolTipAndValue(t,e,i){const r=this.context,a=r.logarithmicScale;r._updateTooltipValue(t),a&&(t=parseFloat(Math.pow(10,parseFloat(t)).toFixed(11)));const n=t.toString();r._number=t,r._drawValue=a?Math.log10(n):t,n!==e&&i&&(r.value=r._discardDecimalSeparator(n),r._programmaticValueIsSet||r.$.fireEvent("change",{value:r.value,oldValue:e}),r.$.hiddenInput&&(r.$.hiddenInput.value=r.value),r._setAriaValue("valuenow"))}validateInterval(t){const e=this.context,i=e._maxObject-e._minObject;t<=0&&(t=1),e._validInterval=Math.min(parseFloat(t),i),e.interval=e._validInterval}getCoercedValue(t,e,i){const r=this.context;if(!r.coerce)return t;let a,n,l=!r.logarithmicScale;if(r.customInterval){const n=r.customTicks;if(0===n.length)return t;l=l||i,a=!1!==e?parseFloat(r._drawMin):r._minObject;let o=Math.abs(a-t),s=a;for(let e=0;e<n.length;e++){const i=this.createDescriptor(n[e]),r=l?i:Math.log10(i),a=Math.abs(r-t);a<o&&(o=a,s=r)}return s}!1!==e?(a=parseFloat(r._drawMin),n=parseFloat(r._drawMax)):(a=parseFloat(r.min),n=parseFloat(r.max));let o=t-a,s=this.getPreciseModulo(o,parseFloat(r.interval)),c=this.roundCoefficient;if(0===s)return t;0===this.roundCoefficient&&(c=12);let m=parseFloat((o-s).toFixed(c)),u=m+parseFloat(r.interval);if(r.max-r.min<=parseFloat(r.interval)&&l){let e=a,i=n;return t>=e+(i-e)/2?i:e}if(Math.abs(o-m)<Math.abs(o-u))return m+a;{const t=u+a;return t>n?m+a:t}}updateValue(t){const e=this.context,i=this.validate(t,e._minObject,e._maxObject),r=e.value;t.toString()!==r.toString()||e._scaleTypeChangedFlag?(e.value=t.toString(),e._number=i,e._programmaticValueIsSet||e.$.fireEvent("change",{value:e.value,oldValue:r})):e.value="string"==typeof t?t:t.toString(),e._drawValue=e.logarithmicScale?Math.log10(i).toString():i.toString(),e._moveThumbBasedOnValue(e._drawValue),e.$.hiddenInput&&(e.$.hiddenInput.value=e.value),e._setAriaValue("valuenow")}getValuePerPx(t,e){return parseFloat(t)/e}restrictValue(t){t[1]<t[0]&&(t[1]=t[0])}lockRotation(t,e){const i=this.context;if(t&&e<i._number){if(i._lockCW=!0,e<i._maxObject)return i._maxObject}else if(!t&&e>i._number&&(i._lockCCW=!0,e>i._minObject))return i._minObject}getAngleRangeCoefficient(){const t=this.context;t._angleRangeCoefficient=t._angleDifference/t._range}}),Smart.Utilities.Assign("ComplexNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e),this.context=t}createDescriptor(t,e,i,r,a,n){let l;return l=n||(t.constructor===this.complexConstructor?new this.complexConstructor(t.realPart,t.imaginaryPart):new this.complexConstructor(t)),r&&(l=this.validate(l,this.context._minObject,this.context._maxObject)),l}validate(t,e,i){let r=t;return e!==-1/0?-1===this.compareComplexNumbers(t,e)&&(r=new this.complexConstructor(e.realPart,e.imaginaryPart)):i!==1/0&&1===this.compareComplexNumbers(t,i)&&(r=new this.complexConstructor(i.realPart,i.imaginaryPart)),r}compare(t,e,i){return!0!==i?0!==this.compareComplexNumbers(t,e):this.compareComplexNumbers(t,e)}validateMinMax(t,e){const i=this.context;t&&(null===i.min||i._regexSpecial.inf.test(i.min)?(i.min=-1/0,i._minObject=-1/0):i._minObject=new this.complexConstructor(i.min)),e&&(null===i.max||i._regexSpecial.inf.test(i.max)?(i.max=1/0,i._maxObject=1/0):i._maxObject=new this.complexConstructor(i.max))}incrementDecrement(t,e){let i=new this.complexConstructor(t.realPart,t.imaginaryPart),r=this.context._spinButtonsStepObject;return"add"===e?(i.realPart+=r.realPart,i.imaginaryPart+=r.imaginaryPart):(i.realPart-=r.realPart,i.imaginaryPart-=r.imaginaryPart),i}render(t){let e=t;if(!1===this.context._regexSpecial.nonNumericValue.test(t)){let t,i=e.realPart,r=e.imaginaryPart,a=this.context.significantDigits,n=this.context.precisionDigits;r>=0?t="+":(t="-",r=Math.abs(r));const l=new Smart.Utilities.NumberRenderer(i),o=new Smart.Utilities.NumberRenderer(r);this.context.scientificNotation?(i=l.toScientific(a,n),r=o.toScientific(a,n)):(i=l.toDigits(a,n),r=o.toDigits(a,n)),e=`${i} ${t} ${r}i`}return e}compareComplexNumbers(t,e){if(t instanceof this.complexConstructor==0||e instanceof this.complexConstructor==0)return-1;const i=t.realPart,r=e.realPart;if(i<r)return-1;if(i>r)return 1;{const i=t.imaginaryPart,r=e.imaginaryPart;return i<r?-1:i>r?1:0}}}),Smart.Utilities.Assign("NumberRenderer",class{constructor(t){const e=this;e.numericValue=t,e.powersToPrefixes={24:"Y",21:"Z",18:"E",15:"P",12:"T",9:"G",6:"M",3:"k",0:"","-3":"m","-6":"u","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},e.localizationObject={currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:",",defaultPrecision:2}}isENotation(t){return new RegExp(/e/i).test(t)}largeExponentialToDecimal(t){let e;void 0===t&&(t=this.numericValue,e=!0);let i=t.toString().toLowerCase(),r=i.indexOf("e"),a=new Smart.Utilities.BigNumber(i.slice(0,r)),n=i.slice(r+1,r+2);"+"!==n&&"-"!==n&&(i=i.slice(0,r)+"e+"+i.slice(r+1),n="+");let l=i.slice(r+2),o=new Smart.Utilities.BigNumber(10).pow(n+(e?Math.min(20,l):l));return a.multiply(o).toString()}bigNumberToExponent(t,e){let i=this.numericValue;i.constructor!==Smart.Utilities.BigNumber&&(i=new Smart.Utilities.BigNumber(i));const r=i._f;let a=i.toString();if(r<=10)return e?parseFloat(a).toExponential(null!==t?t-1:void 0):new Smart.Utilities.NumberRenderer(parseFloat(a)).toDigits(t);if(t>=r&&!e)return a;{let n;!1===i._s?n="":(n="-",a=a.slice(1)),parseFloat(a.slice(t,t+1))>=5&&(a=new Smart.Utilities.BigNumber(a.slice(0,t)).add(1).toString());let l=a.slice(1,t);if(e)t--,l.length>0&&t>l.length?l+="0".repeat(t-l.length):0===l.length&&(l="0".repeat(t));else for(;l.length>0&&"0"===l.charAt(l.length-1);)l=l.slice(0,l.length-1);const o=l.length>0?".":"",s=r-1;return n+a.slice(0,1)+o+l+"E+"+s}}toScientific(){const t=this;let e;if(e=t.numericValue._d?t.bigNumberToExponent(null!==arguments[0]?arguments[0]:arguments[1]+1,!0).toLowerCase():t.numericValue<=-1||t.numericValue>=1?Number(t.toDigits(arguments[0],arguments[1])).toExponential():Number(t.numericValue).toExponential(),isNaN(e))return e;const i=e.indexOf("e");let r=parseInt(e.slice(i+1),10),a=parseFloat(e.slice(0,i)),n=new Smart.Utilities.NumberRenderer(a);if(r<0){let e=n.toDigits(arguments[0],arguments[1]);if(e=parseFloat(e).toExponential(),"0"===e.charAt(e.length-1)){let e=0;for(;r%3!=0;)r--,e++;if(e){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,a=parseFloat(new Smart.Utilities.BigNumber(a).multiply(Math.pow(10,e)).toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]),n.numericValue=a/1e3;const i=n.toDigits(arguments[0],arguments[1]);return i>=1&&(a=i,r+=3),a+t.powersToPrefixes[r.toString()]}}let l=0;if(l=Math.abs(r)>24?r-r/Math.abs(r)*24:r%3,l>0)for(let t=0;t<l;t++)a*=10;else if(l<0){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,a=parseFloat(new Smart.Utilities.BigNumber(a).multiply(Math.pow(10,l)).toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}if(r>0){const t=a>=0?0:1,r=e.slice(t,i).length-l-2;r>=0&&(a=a.toFixed(r))}let o=Number(a).toExponential();o=parseFloat(o.charAt(o.length-1)),n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]);let s=Number(a).toExponential(),c=0;s=parseFloat(s.charAt(s.length-1)),s!==o&&s%3==0&&(a=parseFloat(a)/Math.pow(10,s),n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]),c=s);const m=r-l+c;return a+t.powersToPrefixes[m.toString()]}bigNumberToScientific(){const t=this,e=t.numericValue._f-1,i=parseInt(e,10)%3,r=parseInt(e,10)-i;let a,n,l=t.numericValue.toString();if("-"===l.charAt(0)?(a="-",l=l.slice(1)):a="",null!==arguments[0])for(n=l.slice(0,arguments[0]),parseFloat(l.slice(arguments[0],arguments[0]+1))>=5&&(n=new Smart.Utilities.BigNumber(n).add(1).toString());n.length>1+i&&"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);else null!==arguments[1]&&(n=l.slice(0,arguments[1]+1),parseFloat(l.slice(arguments[1]+1,arguments[1]+2))>=5&&(n=new Smart.Utilities.BigNumber(n).add(1).toString()),arguments[1]+i>n.length-1&&(n+="0".repeat(arguments[1]+i-n.length+1)));return n.length>1+i&&(n=n.slice(0,1+i)+"."+n.slice(1+i)),a+n+t.powersToPrefixes[r.toString()]}toDigits(t,e){const i=this;let r;return r=null!==t?i.applySignificantDigits(t):null!==e?i.applyPrecisionDigits(e):i.applySignificantDigits(8),r}applySignificantDigits(t){const e=this;function i(t){for(;"0"===t.charAt(t.length-1);)t=t.slice(0,-1);return"."===t.charAt(t.length-1)&&(t=t.slice(0,-1)),t}t=Math.max(1,Math.min(t,21));let r=parseFloat(e.numericValue).toPrecision(t).toUpperCase();if(-1!==r.indexOf("."))if(e.isENotation(r)){const t=r.indexOf("."),e=r.indexOf("E");let a=r.slice(t,e);a=i(a),r=r.slice(0,t)+a+r.slice(e)}else r=i(r);return r}applyPrecisionDigits(t){const e=this;t=Math.max(0,Math.min(t,20));let i=parseFloat(e.numericValue).toFixed(t);return e.isENotation(i)&&(i=e.largeExponentialToDecimal(i)+"."+"0".repeat(t)),i}getLogarithm(t){const e=this.numericValue;let i;if(void 0===t&&(t=10),10===t)try{i=Math.log10(e)}catch(t){i=Math.log(e)/Math.log(10)}else i=Math.log(e)/Math.log(t);return i}applySeparators(t,e){const i=this,r=(t=t.toString()).indexOf(".");if(-1!==r){const a=t.slice(0,r),n=t.slice(r+1);return i.applyThousandsSeparator(a,e)+i.localizationObject.decimalseparator+n}return i.applyThousandsSeparator(t,e)}applyThousandsSeparator(t,e){if(e)return t;let i="";"-"===(t=t.toString()).charAt(0)&&(i="-",t=t.slice(1));let r=t.split("").reverse();for(let t=2;t<r.length-1;t+=3)r[t]=this.localizationObject.thousandsseparator+r[t];return r.reverse(),r=r.join(""),i+r}formatNumber(t,e,i){const r=this;if(void 0===arguments[3]&&delete r._ignoreMinus,delete r._wordLengthNumber,!/^([a-zA-Z]\d*)$/g.test(e))try{return r.applyCustomFormat(t,e)}catch(e){return t.toString()}const a=e.slice(0,1);let n=e.slice(1);if(""!==n&&(isNaN(parseFloat(n))||parseFloat(n)<0||parseFloat(n)>99?n="":parseFloat(n)%1!=0&&(n=Math.round(n))),t._d)r.inputFormat="integer";else{if(t.imaginaryPart)return r.formatComplexNumber(t,e,a,n);r.inputFormat="floatingPoint"}let l,o=new Smart.Utilities.NumericProcessor(r,"inputFormat"),s=o.createDescriptor(t);switch(r._wordLengthNumber=o.getWordLength(i||"int32"),"integer"===r.inputFormat&&(s=o.round(s)),r.numericValue=s,a){case"C":case"c":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),l="floatingPoint"===r.inputFormat?r.applyPrecisionDigits(n):s.toString()+(n>0?"."+"0".repeat(n):""),l=r.applySeparators(l),"before"===r.localizationObject.currencysymbolposition?"-"===l.charAt(0)?"-"+r.localizationObject.currencysymbol+l.slice(1):r.localizationObject.currencysymbol+l:l+" "+r.localizationObject.currencysymbol;case"D":case"d":{if(l=s,"floatingPoint"===r.inputFormat&&(l=Math.round(s)),l=l.toString(),""===n)return l;let t="";"-"===l.charAt(0)&&(t="-",l=l.slice(1));const e=n-l.length;return e>0&&(l="0".repeat(e)+l),t+l}case"E":case"e":case"U":case"u":{""===n&&(n=6),l="floatingPoint"===r.inputFormat?s.toExponential(n):r.bigNumberToExponent(parseFloat(n)+1,!0).toLowerCase();const t=l.indexOf("e"),e=l.slice(t+2).length;return e<3&&(l=l.slice(0,t+2)+"0".repeat(3-e)+l.slice(t+2)),"u"===a.toLowerCase()?r.exponentialToSuperscript(r.applySeparators(l,!0)):("E"===a&&(l=l.toUpperCase()),r.applySeparators(l,!0))}case"F":case"f":case"N":case"n":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),l="floatingPoint"===r.inputFormat?r.applyPrecisionDigits(n):s.toString()+(n>0?"."+"0".repeat(n):""),r.applySeparators(l,"f"===a.toLowerCase());case"G":case"g":{if(""===n||"0"===n)if("floatingPoint"===r.inputFormat)n=15;else switch(i){case"int8":case"uint8":n=3;break;case"int16":case"uint16":n=5;break;case"int64":n=19;break;case"uint64":n=20;break;default:n=10}n=parseFloat(n);let e=r.formatNumber(t,"E"+n,i),l=e.indexOf("E");const o=parseInt(e.slice(l+1),10);if(o>-5&&o<n)return"floatingPoint"===r.inputFormat?r.applySeparators(r.applySignificantDigits(n),!0):s.toString();if(o>-100&&o<100&&(e=e.slice(0,l+2)+e.slice(l+3)),-1!==e.indexOf(r.localizationObject.decimalseparator)){for(;"0"===e.charAt(l-1);)e=e.slice(0,l-1)+e.slice(l),l=e.indexOf("E");e.charAt(l-1)===r.localizationObject.decimalseparator&&(e=e.slice(0,l-1)+e.slice(l))}return"g"===a&&(e=e.toLowerCase()),e}case"P":case"p":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),"floatingPoint"===r.inputFormat?(r.numericValue=100*s,l=r.applyPrecisionDigits(n)):l=s.multiply(100).toString()+(n>0?"."+"0".repeat(n):""),r.applySeparators(l)+" %";case"B":case"b":case"O":case"o":case"X":case"x":{let e;switch("integer"!==r.inputFormat&&(r.inputFormat="integer",o=new Smart.Utilities.NumericProcessor(r,"inputFormat"),s=o.round(o.createDescriptor(t))),a){case"B":case"b":e=2;break;case"O":case"o":e=8;break;default:e=16}if(l=s.toString(e,r._wordLengthNumber),""!==n){const t=parseFloat(n)-l.length;t>0&&(l="0".repeat(t)+l)}return"x"===a&&(l=l.toLowerCase()),l}case"S":case"s":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),r.toScientific(null,n).replace(".",r.localizationObject.decimalseparator);default:return t.toString()}}formatComplexNumber(t,e,i){const r=this;switch(i){case"E":case"e":case"U":case"u":case"F":case"f":case"G":case"g":case"N":case"n":case"S":case"s":return t.imaginaryPart>=0?r.formatNumber(t.realPart,e)+" + "+r.formatNumber(t.imaginaryPart,e)+"i":r.formatNumber(t.realPart,e)+" - "+r.formatNumber(Math.abs(t.imaginaryPart),e)+"i";default:return t.toString()}}toString(t,e,i){return e?this.formatNumber(t,e,i):t.toString()}applyCustomFormat(t,e){const i=this,r=(e=(e=e.replace(/_.|\[\w*\]|\*/g,"")).replace(/\?/g,"#")).split(";");if("string"==typeof t&&isNaN(t))return r[r.length-1].replace(/"/g,"").replace(/@/g,t.toString());if(t._d)i.inputFormat="integer";else{if(t.imaginaryPart)return t.toString();t=parseFloat(t),i.inputFormat="floatingPoint"}let a=new Smart.Utilities.NumericProcessor(i,"inputFormat"),n=a.createDescriptor(t);"integer"===i.inputFormat&&(n=a.round(n)),i.numericProcessor=a;const l=i.getRelevantFormatSection(r,n);if(void 0===l)return t.toString();if(-1!==l.indexOf("@"))return r[r.length-1].replace(/"/g,"").replace(/@/g,t.toString());const o=-1!==l.replace(/".*"/g,"").indexOf("%"),s=i.getTextParts(l);if(-1!==s.main.toLowerCase().indexOf("e"))return i.applyCustomExponentialFormat(n,s,a);if(-1!==s.main.indexOf("/"))return i.applyCustomFractionalFormat(n,s,a);if(o&&("integer"===i.inputFormat?n=n.multiply(100):n*=100),""===s.main){if(!o)return s.suffix;let t=n.toString();return i._ignoreMinus&&"-"===t.charAt(0)&&(t=t.slice(1)),t+s.suffix}let c=s.main.replace(/[^0#,. \/]/g,""),m=c.indexOf(".");for(-1!==m&&(c=c.substring(0,m+1)+c.substring(m+1).replace(/\./g,""),"."===c.charAt(c.length-1)&&(c=c.slice(0,c.length-1)),0===m&&(c="#"+c));","===c.charAt(c.length-1);)c=c.slice(0,c.length-1),"floatingPoint"===i.inputFormat?n/=1e3:n=n.multiply(.001);"integer"===i.inputFormat&&(n=a.round(n));const u=-1!==c.indexOf(",");c=c.replace(/,/g,"");const g=c.split("."),d=g[0];let p=g[1],h="";if(1===g.length)return"floatingPoint"===i.inputFormat&&(n=a.round(n)),h=n.toString(),i.setTextParts(i.formatWholeNumber(h,d,u),s);h=n.toString();let b=h.split("."),f=i.formatWholeNumber(b[0],d,u),_=b[1]||"";if(p.length<=_.length&&(h=parseFloat(n.toFixed(p.length)).toString(),b=h.split("."),f=i.formatWholeNumber(b[0],d,u),_=b[1]||"",_))return i.setTextParts(f+i.localizationObject.decimalseparator+_.slice(0,p.length),s);p=p.slice(_.length-p.length);let S=p.lastIndexOf("0");return-1===S?""===_?i.setTextParts(f,s):i.setTextParts(f+i.localizationObject.decimalseparator+_,s):i.setTextParts(f+i.localizationObject.decimalseparator+_+"0".repeat(S+1),s)}getRelevantFormatSection(t,e){const i=this,r=i.numericProcessor.compare(e,0,!0);if(1===r)return t[0];let a,n;return t.length>=3?(i._ignoreMinus=!0,a=1,n=2):2===t.length?(i._ignoreMinus=!0,n=0,a=1):1===t.length&&(n=0,a=0),0===r?t[n]:-1===r?t[a]:void 0}getTextParts(t){const e=t.replace(/"[^"]*"/g,""),i=t.match(/"[^"]*"/g),r=e.search(/0|#|\./g),a=Math.max(e.lastIndexOf("0"),e.lastIndexOf("#"),e.lastIndexOf("."),e.lastIndexOf(",")),n=e.slice(r,a+1);if(""===n)return{prefix:"",main:"",suffix:t.replace(/"/g,"")};let l=t.indexOf(n),o=l+n.length;if(i)for(let e=0;e<i.length;e++){const r=t.indexOf(i[e]);l>=r&&o<=r+i[e].length&&(l=t.indexOf(n,r+i[e].length),o=l+n.length)}return{prefix:t.slice(0,l).replace(/"/g,""),main:n,suffix:t.slice(o).replace(/"/g,"")}}applyCustomExponentialFormat(t,e,i){const r=this;let a,n=e.main;const l=-1!==n.indexOf(",");n=n.replace(/[^0#.eE+-]/g,"");const o=n.toLowerCase().indexOf("e");n=n.substring(0,o+1)+n.substring(o+1).replace(/[eE\.]/g,"");const s=n.charAt(o),c=n.indexOf(".");-1!==c&&(n=n.substring(0,c+1)+n.substring(c+1).replace(/\./g,"")),"."===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1));const m=n.split(s);let u=m[0];const g=u.split("."),d=g[0],p=g[1],h=m[1];let b=t.toString().split(".")[0].replace(/-/,""),f=0;if("0"===b&&i.compare(t,0)){let e=d.length-1;for(;0===parseInt(t);)f++,t*=10;b=t.toString().split(".")[0].replace(/-/,""),f+=e,t*=Math.pow(10,e)}if(l&&(u=u.slice(0,1)+","+u.slice(1)),b.length<=d.length)a=r.formatNumber(t,u,void 0,!0)+s+r.formatExponent(0-f,h);else{const e=b.length-d.length;let n="floatingPoint"===r.inputFormat?t/Math.pow(10,e):t.divide(Math.pow(10,e));p||(a=r.applyThousandsSeparator(i.round(n).toString(),!l)+s+r.formatExponent(e-f,h));let o=n.toString().split(".")[1]||"";o.length===p.length?a=r.applySeparators(n,!l)+s+r.formatExponent(e-f,h):o.length<p.length?a=r.formatNumber(n,u,void 0,!0)+s+r.formatExponent(e-f,h):(n="floatingPoint"===r.inputFormat?n.toFixed(p.length):n=i.round(t.divide(Math.pow(10,e-p.length))).divide(Math.pow(10,p.length)),a=r.formatNumber(parseFloat(n),u,void 0,!0)+s+r.formatExponent(e-f,h))}return r.setTextParts(a,e)}formatExponent(t,e){let i;return-1!==["+","-"].indexOf(e.charAt(0))&&(i=e.charAt(0),(t>0&&"-"===i||t<0&&"+"===i)&&(i=void 0)),t<0&&(t=Math.abs(t),i="-"),e=e.replace(/[+-]/g,""),(i||"")+(t=this.formatNumber(t,e,void 0,!0))}formatWholeNumber(t,e,i){const r=this;let a="";if("-"===t.charAt(0)&&(r._ignoreMinus||(a="-"),t=t.slice(1)),"0"===t){if(e==="#".repeat(e.length))return a;t=""}if(e.length<=t.length)return a+r.applyThousandsSeparator(t,!i);for(let i=(e=e.slice(0,e.length-t.length)).length-1;i>=0;i--)"0"===e.charAt(i)&&(t="0"+t);return a+r.applyThousandsSeparator(t,!i)}setTextParts(t,e){return e.prefix+t+e.suffix}applyCustomFractionalFormat(t,e,i){const r=this,a=/^([0#,]+[ ]+)?([0#,]+\/[0#,]+)$/;let n,l=e.main.trim();if(!a.test(l))return t.toString();const o=a.exec(l);if(o[2]=o[2].replace(/,/g,""),"integer"===r.inputFormat){const i=o[2].split("/");return void 0===o[1]?n=r.formatNumber(t,i[0],void 0,!0)+"/"+r.formatNumber(1,i[1],void 0,!0):(n=r.formatNumber(t,o[1].trim(),void 0,!0),-1!==o[2].indexOf("0")&&(n+=" "+r.formatNumber(0,i[0],void 0,!0)+"/"+r.formatNumber(1,i[1],void 0,!0))),r.setTextParts(n,e)}if(void 0===o[1])n=(t<0?"-":"")+r.formatAsFraction(Math.abs(t),o[2]);else{const e=o[1].trim(),a=o[2];n=r.formatNumber(parseInt(t,10),e,void 0,!0)+" "+r.formatAsFraction(i.getPreciseModulo(Math.abs(t),1),a)}return r.setTextParts(n.trim(),e)}formatAsFraction(t,e){const i=this,r=e.split("/");if(0===t)return-1===e.indexOf("0")?"":i.formatNumber(0,r[0],void 0,!0)+"/"+i.formatNumber(1,r[1],void 0,!0);if(t%1==0)return i.formatNumber(t,r[0],void 0,!0)+"/"+i.formatNumber(1,r[1],void 0,!0);const a=[];i.approximateFractions(t,a);const n=r[1].length>=2?2:1;let l=[],o=[];a.forEach((function(e,i){const r=e.denominator.toString().length,a=Math.abs(t-e.numerator/e.denominator);if(void 0===l[r])return o[r]=i,void(l[r]=a);a<l[r]&&(o[r]=i,l[r]=a)}));let s=o[n]?a[o[n]]:a[o[1]];return i.formatNumber(s.numerator,r[0],void 0,!0)+"/"+i.formatNumber(s.denominator,r[1],void 0,!0)}approximateFractions(t,e){const i=[0,1],r=[1,0],a=this.getMaxNumerator(t);let n,l=t,o=NaN;for(let s=2;s<1e3;s++){const c=Math.floor(l);if(i[s]=c*i[s-1]+i[s-2],Math.abs(i[s])>a)return;if(r[s]=c*r[s-1]+r[s-2],n=i[s]/r[s],n===o)return;if(e.push({numerator:i[s],denominator:r[s]}),n===t)return;o=n,l=1/(l-c)}}getMaxNumerator(t){let e=null,i=t.toString().indexOf("E");-1===i&&(i=t.toString().indexOf("e")),e=-1===i?t.toString():t.toString().substring(0,i);let r=null;const a=e.toString().indexOf(".");-1===a?r=e:0===a?r=e.substring(1,e.length):a<e.length&&(r=e.substring(0,a)+e.substring(a+1,e.length));let n=r;const l=n.toString().length,o=t;let s=o.toString().length;0===o&&(s=0);const c=l-s;for(let t=c;t>0&&n%2==0;t--)n/=2;for(let t=c;t>0&&n%5==0;t--)n/=5;return n}exponentialToSuperscript(t){const e=t.indexOf("e"),i=t.slice(e+1).replace(/0{1,2}/,"");let r=t.slice(0,e+1);return r=r.replace("e","×10"),r+=this.toSuperscript(i),r=r.replace("+",""),r}toSuperscript(t,e){const i="-0123456789",r="⁻⁰¹²³⁴⁵⁶⁷⁸⁹";let a="";for(let n=0;n<t.length;n++)if(!0===e){const e=r.indexOf(t.charAt(n));a+=-1!==e?i[e]:t[n]}else{const e=i.indexOf(t.charAt(n));a+=-1!==e?r[e]:t[n]}return a}});
/***/ }),
/***/ 9135:
/***/ (() => {
Smart("smart-scroll-bar",class extends Smart.BaseElement{static get properties(){return{clickRepeatDelay:{type:"integer",value:50},largeStep:{type:"integer",value:100},min:{type:"integer",value:0},max:{type:"integer",value:1e3},mechanicalAction:{value:"switchWhileDragging",allowedValues:["switchUntilReleased","switchWhenReleased","switchWhileDragging"],type:"string"},orientation:{type:"string",value:"horizontal",allowedValues:["horizontal","vertical"]},step:{type:"integer",value:10},showButtons:{type:"boolean",value:!0,defaultReflectToAttribute:!0},value:{type:"integer",value:0}}}static get styleUrls(){return["smart.scrollbar.css"]}template(){return'<div id="container" class="smart-container" role="presentation">\n <div id="nearButton" class="smart-scroll-button smart-arrow-left" role="presentation" aria-hidden="true"></div>\n <div id="track" class="smart-track" role="presentation">\n <div id="thumb" class="smart-thumb" role="presentation"></div>\n </div>\n <div id="farButton" class="smart-scroll-button smart-arrow-right" role="presentation" aria-hidden="true"></div>\n </div>'}static get listeners(){return{"nearButton.click":"_nearButtonClickHandler","nearButton.down":"_startRepeat","nearButton.up":"_stopRepeat","nearButton.pointerenter":"_updateInBoundsFlag","nearButton.pointerleave":"_updateInBoundsFlag","farButton.click":"_farButtonClickHandler","farButton.down":"_startRepeat","farButton.up":"_stopRepeat","farButton.pointerenter":"_updateInBoundsFlag","farButton.pointerleave":"_updateInBoundsFlag","track.down":"_trackDownHandler","track.click":"_trackClickHandler","track.move":"_trackMoveHandler","thumb.down":"_dragStartHandler","document.move":"_dragHandler","document.up":"_dragEndHandler",up:"_dragEndHandler","document.selectstart":"_selectStartHandler",resize:"_resizeHandler"}}_updateInBoundsFlag(t){const e=this,a=t.target;a._isPointerInBounds=!0,-1!==t.type.indexOf("leave")&&(a._isPointerInBounds=!1),1!==("buttons"in t?t.buttons:t.which)&&e._stopRepeat(t)}_startRepeat(t){const e=this;if(e.disabled)return;const a=t.target;a._initialTimer||(a._initialTimer=setTimeout((function(){a._repeatTimer=setInterval((()=>{if(a._isPointerInBounds){const e="buttons"in t?t.buttons:t.which;a.$.fireEvent("click",{buttons:e,clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY})}}),e.clickRepeatDelay)}),3*e.clickRepeatDelay))}_stopRepeat(t){if(this.disabled)return;const e=t.target;e._repeatTimer&&(clearInterval(e._repeatTimer),e._repeatTimer=null),e._initialTimer&&(clearTimeout(e._initialTimer),e._initialTimer=null)}_calculateThumbSize(t){const e=this,a=e.max-e.min,r="horizontal"===e.orientation?e.$.track.offsetWidth>10:e.$.track.offsetHeight>10;let n=0;return a>=1&&r?(n=t/(a+t)*t,e.$.thumb.className.indexOf("smart-hidden")>=0&&e.$thumb.removeClass("smart-hidden")):e.$thumb.addClass("smart-hidden"),Math.max(10,Math.min(n,t))}_dragStartHandler(t){const e=this;e.disabled||(e.thumbCapture=!0,e.dragStartX=t.clientX,e.dragStartY=t.clientY,e.dragStartValue=e.value,t.stopPropagation(),t.preventDefault())}_dragHandler(t){const e=this;if(!0!==e.thumbCapture)return;e._isThumbDragged=!0;const a=(e.max-e.min)/(e.scrollBarSize-e.thumbSize),r="horizontal"===e.orientation?(t.clientX-e.dragStartX)*a:(t.clientY-e.dragStartY)*a;let n=r;e.rightToLeft&&"horizontal"===e.orientation&&(n=-r),e._updateValue(e.dragStartValue+n),t.stopPropagation(),t.preventDefault(),t.originalEvent&&(t.originalEvent.stopPropagation(),t.originalEvent.preventDefault())}_dragEndHandler(t){const e=this;e._trackDownTimer&&(clearInterval(e._trackDownTimer),e._trackDownTimer=null),e.thumbCapture&&(e.thumbCapture=!1,e._isThumbDragged=!1,"switchWhenReleased"===e.mechanicalAction?e._updateValue(e.dragStartValue,e.value):"switchUntilReleased"===this.mechanicalAction&&e._updateValue(e.dragStartValue),t.preventDefault(),t.stopPropagation(),t.originalEvent.preventDefault(),t.originalEvent.stopPropagation())}_farButtonClickHandler(){const t=this;if(t.disabled)return;const e=t.value;t._updateValue(t.value+("horizontal"===t.orientation&&t.rightToLeft?-1:1)*t.step),"switchUntilReleased"===t.mechanicalAction&&t._updateValue(e)}_nearButtonClickHandler(){const t=this;if(t.disabled)return;const e=t.value;t._updateValue(t.value-("horizontal"===t.orientation&&t.rightToLeft?-1:1)*t.step),"switchUntilReleased"===t.mechanicalAction&&t._updateValue(e)}propertyChangedHandler(t,e,a){super.propertyChangedHandler(t,e,a);const r=this;switch(t){case"min":case"max":case"orientation":case"showButtons":r._layout(),"min"===t?r.setAttribute("aria-valuemin",a):"max"===t?r.setAttribute("aria-valuemax",a):"orientation"===t&&r.setAttribute("aria-orientation",a);break;case"value":r._updateValue(e,a);break;default:r._layout()}}render(){const t=this;t.setAttribute("role","scrollbar"),t.setAttribute("aria-orientation",t.orientation),t.setAttribute("aria-valuemin",t.min),t.setAttribute("aria-valuemax",t.max),t.setAttribute("aria-valuenow",t.value),t._layout(),super.render()}_resizeHandler(){this._layout()}refresh(){this._layout()}beginUpdate(){this._isUpdating=!0}endUpdate(){this._isUpdating=!1,this.refreshValue()}refreshValue(){const t=this;t._layout(),t._updateValue(t.value)}_layout(){const t=this;t._isUpdating||(t.scrollBarSize="horizontal"===t.orientation?t.$.track.offsetWidth:t.$.track.offsetHeight,t.thumbSize=t._calculateThumbSize(t.scrollBarSize),"horizontal"===t.orientation&&t.$.thumb.style.width!==t.thumbSize+"px"?t.$.thumb.style.width=t.thumbSize+"px":"vertical"===t.orientation&&t.$.thumb.style.height!==t.thumbSize+"px"&&(t.$.thumb.style.height=t.thumbSize+"px"),"horizontal"===t.orientation?(t.$.nearButton.classList.contains("smart-arrow-up")&&t.$.nearButton.classList.remove("smart-arrow-up"),t.$.farButton.classList.contains("smart-arrow-down")&&t.$.farButton.classList.remove("smart-arrow-down"),t.$.nearButton.classList.contains("smart-arrow-left")||t.$.nearButton.classList.add("smart-arrow-left"),t.$.farButton.classList.contains("smart-arrow-right")||t.$.farButton.classList.add("smart-arrow-right")):(t.$.nearButton.classList.contains("smart-arrow-left")&&t.$.nearButton.classList.remove("smart-arrow-left"),t.$.farButton.classList.contains("smart-arrow-right")&&t.$.farButton.classList.remove("smart-arrow-right"),t.$.nearButton.classList.contains("smart-arrow-up")||t.$.nearButton.classList.add("smart-arrow-up"),t.$.farButton.classList.contains("smart-arrow-down")||t.$.farButton.classList.add("smart-arrow-down")),t._updateThumbPosition(),(t.value>t.max||t.value<t.min)&&t._updateValue(t.value,t.value>t.max?t.max:t.min))}_selectStartHandler(t){this.thumbCapture&&t.preventDefault()}_trackDownHandler(t){const e=this;t.target===e.$.track&&(e._trackDownTimer&&clearInterval(e._trackDownTimer),e.thumbCapture||(e._trackDownTimer=setInterval((function(){e._trackClickHandler(t)}),e.clickRepeatDelay),t.stopPropagation(),t.preventDefault()))}_trackClickHandler(t){const e=this;if(e.disabled)return;if(e._isThumbDragged)return clearInterval(e._trackDownTimer),void(e._trackDownTimer=null);const a=e.$.thumb.getBoundingClientRect(),r=t.pageX-window.pageXOffset,n=t.pageY-window.pageYOffset,i=(e.rightToLeft?-1:1)*e.value;"horizontal"===e.orientation?r>(e._isThumbDragged?e.dragStartX:a.right)?e._updateValue(e.value+(e.rightToLeft?-1:1)*e.largeStep):r<(e._isThumbDragged?e.dragStartX:a.left)&&e._updateValue(e.value-(e.rightToLeft?-1:1)*e.largeStep):n>(e._isThumbDragged?e.dragStartY:a.bottom)?e._updateValue(e.value+e.largeStep):n<(e._isThumbDragged?e.dragStartY:a.top)&&e._updateValue(e.value-e.largeStep),"switchUntilReleased"===e.mechanicalAction&&e._updateValue(i)}_trackMoveHandler(t){"touchmove"===t.originalEvent.type&&t.originalEvent.preventDefault()}_updateValue(t,e){const a=this;if(!a._isUpdating&&(1===arguments.length&&(e=t,t=a.value),(void 0===e||isNaN(e))&&(e=a.min),e>a.max&&(e=a.max),e<a.min&&(e=a.min),a.value=e,t!==e)){if(a.setAttribute("aria-valuenow",e),a._updateThumbPosition(),a.thumbCapture&&"switchWhenReleased"===a.mechanicalAction)return;if(a.onChange)return void a.onChange({value:a.value,oldValue:t,min:a.min,max:a.max,context:a});a.$.fireEvent("change",{value:a.value,oldValue:t,min:a.min,max:a.max})}}_updateThumbPosition(){const t=this,e="horizontal"===t.orientation?t.$.track.offsetWidth:t.$.track.offsetHeight,a=t._calculateThumbSize(e),r=e-a;let n=(e-a)/(t.max-t.min)*(t.value-t.min);t.rightToLeft&&"horizontal"===t.orientation&&(n=(e-a)/(t.max-t.min)*(t.max-t.value-t.min)),n=Math.min(r,Math.max(0,n)),"vertical"===t.orientation&&t.$.thumb.style.top!==n+"px"?t.$.thumb.style.top=n+"px":"horizontal"===t.orientation&&t.$.thumb.style.left!==n+"px"&&(t.$.thumb.style.left=n+"px")}});
/***/ }),
/***/ 5478:
/***/ (() => {
Smart("smart-tank",class extends Smart.BaseElement{static get properties(){return{coerce:{value:!1,type:"boolean"},customInterval:{value:!1,type:"boolean"},customTicks:{reflectToAttribute:!1,value:["0","50","100"],type:"array"},dateLabelFormatString:{value:"d",type:"string"},decimalSeparator:{value:".",type:"string"},interval:{value:"1",type:"any"},inverted:{value:!1,type:"boolean"},labelFormatFunction:{value:null,type:"function?"},labelsVisibility:{value:"all",allowedValues:["all","endPoints","none"],type:"string"},logarithmicScale:{value:!1,type:"boolean"},max:{value:"100",type:"any"},mechanicalAction:{value:"switchWhileDragging",allowedValues:["switchUntilReleased","switchWhenReleased","switchWhileDragging"],type:"string"},messages:{value:{en:{missingReference:"{{elementType}}: Missing reference to {{files}}.",significantPrecisionDigits:"{{elementType}}: the properties significantDigits and precisionDigits cannot be set at the same time.",invalidMinOrMax:"{{elementType}}: Invalid {{property}} value. Max cannot be lower than Min.",noInteger:'{{elementType}}: precisionDigits could be set only on "floatingPoint" scaleType.'}},type:"object",extend:!0},min:{value:"0",type:"any"},mode:{value:"numeric",allowedValues:["numeric","date"],type:"string"},name:{value:"",type:"string"},orientation:{value:"vertical",allowedValues:["horizontal","vertical"],type:"string"},precisionDigits:{value:null,type:"number?"},scalePosition:{value:"near",allowedValues:["near","far","both","none"],type:"string"},scaleType:{value:"floatingPoint",allowedValues:["floatingPoint","integer"],type:"string"},scientificNotation:{value:!1,type:"boolean"},showThumbLabel:{value:!1,type:"boolean"},showTooltip:{value:!1,type:"boolean"},showUnit:{value:!1,type:"boolean"},significantDigits:{value:null,type:"number?"},thumbLabelPosition:{value:"near",allowedValues:["near","far"],type:"string"},ticksPosition:{value:"scale",allowedValues:["scale","track"],type:"string"},ticksVisibility:{value:"minor",allowedValues:["major","minor","none"],type:"string"},tooltipPosition:{value:"near",allowedValues:["near","far"],type:"string"},unit:{defaultReflectToAttribute:!0,value:"kg",type:"string"},validation:{value:"strict",allowedValues:["strict","interaction"],type:"string"},value:{value:"0",type:"any"},wordLength:{value:"int32",allowedValues:["int8","uint8","int16","uint16","int32","uint32","int64","uint64"],type:"string"}}}static get listeners(){return{"track.down":"_trackDownHandler","track.move":"_trackMoveHandler","document.move":"_documentMoveHandler","document.up":"_documentUpHandler",keydown:"_keydownHandler",resize:"_resizeHandler",styleChanged:"_styleChangedHandler","document.selectstart":"_selectStartHandler","track.mouseenter":"_trackOnMouseEnterHandler","track.mouseleave":"_trackOnMouseLeaveHandler"}}static get requires(){return{"Smart.Utilities.BigNumber":"smart.math.js","Smart.Utilities.NumericProcessor":"smart.numeric.js","Smart.Utilities.TickIntervalHandler":"smart.tickintervalhandler.js"}}static get styleUrls(){return["smart.tank.css"]}template(){return'<div id="container" class="smart-container" role="presentation">\n <div id="scaleNear" class="smart-scale smart-scale-near" role="presentation" aria-hidden="true"></div>\n <div id="track" class="smart-track" role="presentation">\n <div id="fill" class="smart-value" role="presentation">\n <div id="bubbleContainer" class="smart-bubble-container" role="presentation"></div>\n <div id="tooltip" class="smart-tooltip" role="tooltip"><div id="tooltipContent" class="smart-tooltip-content smart-unselectable" role="presentation"></div></div>\n <div id="thumb" class="smart-thumb">\n <div class="smart-thumb-label-container">\n <span id="thumbLabel" class="smart-thumb-label"></span>\n </div>\n </div>\n </div>\n <div id="trackTicksContainer" class="smart-track-ticks-container smart-hidden" role="presentation"></div>\n </div>\n <div id="scaleFar" class="smart-scale smart-scale-far" role="presentation" aria-hidden="true"></div>\n <input id="hiddenInput" type="hidden" name="[[name]]">\n </div>'}ready(){super.ready(),this._redefineProperty("customTicks"),this.checkLicense()}render(){const e=this;e.setAttribute("role","slider"),this._createElement(),e.enableShadowDOM&&e.$.hiddenInput&&e.appendChild(e.$.hiddenInput),super.render()}_createElement(){const e=this;e.$.tooltip.id||(e.$.tooltip.id=e.id+"Tooltip"),e.setAttribute("aria-describedby",e.$.tooltip.id),e.$.fill.style.transition="none","numeric"===e.mode?e._getEventValue=function(){return e.value}:e._handleDateScale(),e._setSettingsObject(),e._setDrawVariables(),e._getLayoutType(),e._numericProcessor=new Smart.Utilities.NumericProcessor(e,"scaleType"),e._numberRenderer=new Smart.Utilities.NumberRenderer,e._isVisible()?(e._renderingSuspended=!1,e._setInitialComponentDisplay(),e._measurements={},e._wordLengthNumber=e._numericProcessor.getWordLength(e.wordLength),e._validateInitialPropertyValues(),e._setTicksAndInterval(),e._validate(!0),e._updateTooltipValue(e._drawValue),e._setFocusable(),e._setTrackSize(),e._setBubbles(),e.$.fill.style.transition="",e.$.hiddenInput.value=e._getEventValue(),e.setAttribute("aria-orientation",e.orientation),e._setAriaValue("valuenow")):e._renderingSuspended=!0}val(e){const t=this;if(void 0===e)return t._getEventValue();if("date"===t.mode){let a=Smart.Utilities.DateTime.validateDate(e);return a=a.getTimeStamp(),0!==a.compare(t.value)?void t._validate(!1,a,void 0,!0):t._valueDate}if(t.value.toString().toUpperCase()===e.toString().toUpperCase())return t.value="string"==typeof e?e:e.toString();{e=e.toString().replace(/\s/g,""),t._numericProcessor.regexScientificNotation.test(e)&&(e=t._numericProcessor.scientificToDecimal(e));const a=t._discardDecimalSeparator(e.toString());t._validate(!1,a,void 0,!0),delete t._valueBeforeCoercion}}_setBubbles(){if(!this.hasAnimation)return;let e,t=document.createDocumentFragment();for(let a=0;a<5;a++)e=document.createElement("div"),e.classList.add("bubble"),e.classList.add("bubble"+(a+1)),t.appendChild(e);this.$.bubbleContainer.appendChild(t)}_setTrackSize(){const e=this;"vertical"===e.orientation?e._trackSize=e.$.track.offsetWidth:e._trackSize=e.$.track.offsetHeight}getOptimalSize(){const e=this;if(e._renderingSuspended)return{width:0,height:0};let t,a,i;switch(e.labelsVisibility){case"all":a=e._numericProcessor._longestLabelSize;break;case"endPoints":a=Math.max(e._tickIntervalHandler.labelsSize.minLabelOtherSize,e._tickIntervalHandler.labelsSize.maxLabelOtherSize);break;case"none":a=0}switch(e.orientation){case"horizontal":return t={marginA:"marginBottom",marginB:"marginTop",nearScaleDistance:"bottom",farScaleDistance:"top",paddingA:"paddingBottom",paddingB:"paddingTop",offset:"offsetWidth",distance:"left"},e._orientationChanged&&(t.offset="offsetHeight",e._trackChanged=!0),i=e._getSize(a,t),{width:i.optimalOtherSize,height:i.optimalSize};case"vertical":return t={marginA:"marginLeft",marginB:"marginRight",nearScaleDistance:"right",farScaleDistance:"left",paddingA:"paddingLeft",paddingB:"paddingRight",offset:"offsetHeight",distance:"top"},e._orientationChanged&&(t.offset="offsetWidth",e._trackChanged=!0),i=e._getSize(a,t),{width:i.optimalSize,height:i.optimalOtherSize}}}_updateTargetValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const a=e.dataset.property,i=e.value;a&&void 0!==t[a]&&(t[a]=i)}}}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const i=this;if(i._isVisible()&&!i._renderingSuspended)if(a!=t)switch(e){case"labelsVisibility":case"ticksVisibility":return void i._updateScaleWidth(i._numericProcessor._longestLabelSize);case"coerce":if(a){const e=i.value,t=a=i.logarithmicScale?Math.pow(10,i._numericProcessor.getCoercedValue(Math.log10(e))):i._numericProcessor.getCoercedValue(e);i._validate(!1,t,!0,!0),i._valueBeforeCoercion=e}else void 0!==i._valueBeforeCoercion&&i._validate(!1,i._valueBeforeCoercion,!1,!0);return;case"interval":{i._numericProcessor.validateInterval(a);const e=a=i.logarithmicScale?Math.pow(10,i._numericProcessor.getCoercedValue(Math.log10(i.value))):i._numericProcessor.getCoercedValue(i.value);i._validate(!1,e,i.coerce,!0);break}case"min":case"max":{"date"===i.mode&&(delete i._dateInterval,i[e]=Smart.Utilities.DateTime.validateDate(a).getTimeStamp()),i._validateMinMax(e,!1,t);const r=i._numericProcessor.createDescriptor(i._discardDecimalSeparator(i.value,i.decimalSeparator),void 0,!0,"strict"===i.validation);i._setTicksAndInterval(),i._numericProcessor.updateValue(r);let n=i.getOptimalSize(),s=i.getBoundingClientRect(),o=i.$.track.getBoundingClientRect();n.width>s.width&&o.width<20&&(i.style.width=n.width+"px",i.style.height=n.height+"px");break}case"inverted":case"rightToLeft":{i._getLayoutType(),i._normalLayout&&(i.$.fill.style[i._settings.margin]="0px");let e=i._numericProcessor.createDescriptor(i.value),t=i._numericProcessor.validate(e,i._minObject,i._maxObject);i._setTicksAndInterval(),i._numericProcessor.updateValue(t);break}case"orientation":{const e=i.$.fill.style,t=i.$.container.style;switch(!0!==i._orientationChanged&&(i._orientationChanged=!0),i._tankSizeBeforeOrientation={width:i.offsetWidth,height:i.offsetHeight},i._setSettingsObject(),i._getLayoutType(),i.rightToLeft&&(e.marginLeft="0"),i.inverted&&(e.marginTop="0",e.marginLeft="0"),i.orientation){case"vertical":i.inverted||(e.marginTop="auto",e.marginLeft="0"),e.width="100%",t.paddingLeft="0",t.paddingRight="0";break;case"horizontal":(!i.inverted||!i.inverted&&!i.rightToLeft||i.rightToLeft&&i.inverted)&&(e.marginTop="0",e.marginLeft="auto"),e.height="100%",t.paddingTop="0",t.paddingBottom="0"}i._validateMinMax("both");const r=i._numericProcessor.createDescriptor(i.value),n=i._numericProcessor.validate(r,i._minObject,i._maxObject);i._setTicksAndInterval(),i._setTicksAndInterval(),i._numericProcessor.updateValue(n),i._trackChanged=!0,i.setAttribute("aria-orientation",a);break}case"significantDigits":case"precisionDigits":if("date"===i.mode)return;if("precisionDigits"===e&&"integer"===i.scaleType&&i.error(i.localize("noInteger",{elementType:i.nodeName.toLowerCase(),property:e})),"significantDigits"===e&&null!==i.precisionDigits?i.precisionDigits=null:"precisionDigits"===e&&null!==i.significantDigits&&(i.significantDigits=null),i._validateInitialPropertyValues(),i._setTicksAndInterval(),"horizontal"===i.orientation&&(i.inverted||i.rightToLeft)){const e=i._numericProcessor.valueToPx(i._numericProcessor.getCoercedValue(i._drawValue));i.updateFillSizeAndPosition(e,i._settings.margin,a,!1)}break;case"decimalSeparator":{if("integer"===i.scaleType||"date"===i.mode)return;const e=i._discardDecimalSeparator(i.value,t),a=i._applyDecimalSeparator(e);i.value=e,delete i._valueBeforeCoercion,i._numericProcessor.addTicksAndLabels(),i._updateTooltipValue(a);break}case"value":if(i.value=t,null===a)return;if("date"===i.mode){let e=Smart.Utilities.DateTime.validateDate(a);return e=e.getTimeStamp(),void(0!==e.compare(t)&&i._validate(!1,e,void 0,!0))}if(a.toString().toUpperCase()!==t.toString().toUpperCase()){let e=void 0!==a?a.toString().replace(/\s/g,""):t.toString().replace(/\s/g,"");i._numericProcessor.regexScientificNotation.test(e)&&(e=i._numericProcessor.scientificToDecimal(e)),i._validate(!1,e,void 0,!0),delete i._valueBeforeCoercion}else i.value="string"==typeof a?a:a.toString();break;case"scaleType":if("date"===i.mode)return void(i.scaleType="integer");i._changeScaleType(t,a);break;case"disabled":case"unfocusable":i._setFocusable();break;case"showUnit":case"unit":i._setTicksAndInterval(),i._moveThumbBasedOnValue(i._drawValue);break;case"tooltipPosition":break;case"wordLength":{if("date"===i.mode)return void(i.wordLength="uint64");i._wordLengthNumber=i._numericProcessor.getWordLength(a),i._validateMinMax("both");const e=i._numericProcessor.createDescriptor(i.value),t=i._numericProcessor.validate(e,i._minObject,i._maxObject);i._setTicksAndInterval(),i._numericProcessor.updateValue(t);break}case"scalePosition":i._setInitialComponentDisplay(),i._setTicksAndInterval(),i._moveThumbBasedOnValue(i._drawValue);break;case"labelFormatFunction":case"scientificNotation":{if("date"===i.mode&&"scientificNotation"===e)return;const t=i._discardDecimalSeparator(i.value,i.decimalSeparator);i._setTicksAndInterval(),i._updateTooltipValue(t);break}case"logarithmicScale":if("date"===i.mode)return void(i.logarithmicScale=!1);i._validateMinMax("both"),i._setTicksAndInterval(),i._validate(!1,i.value,void 0,!0);break;case"ticksPosition":"scale"===a?(i.$trackTicksContainer.addClass("smart-hidden"),i.$.trackTicksContainer.innerHTML=""):i.$trackTicksContainer.removeClass("smart-hidden"),i._numericProcessor.addTicksAndLabels();break;case"customInterval":a?(i._customTicks&&(i.customTicks=i._customTicks),i._numericProcessor.validateCustomTicks()):"date"===i.mode&&(i._customTicks=i.customTicks),i._setTicksAndInterval(),i._coerceCustomInterval();break;case"customTicks":if("date"===i.mode&&!i.customInterval)return i._customTicks=a,void(i.customTicks=t);i._numericProcessor.validateCustomTicks(),i.customInterval&&(i._setTicksAndInterval(),i._coerceCustomInterval());break;case"dateLabelFormatString":"date"===i.mode&&i._setTicksAndInterval();break;case"mode":i.mode=t;break;case"showThumbLabel":a&&i.showTooltip&&(i.showTooltip=!1);break;case"showTooltip":a&&i.showThumbLabel&&(i.showThumbLabel=!1);break;case"validation":"strict"===a&&i._validate(!1,i.value)}else i[e]=t;else i._renderingSuspended=!0}_setSettingsObject(){const e=this;"horizontal"===e.orientation?e._settings={clientSize:"clientWidth",dimension:"width",leftOrTop:"left",margin:"marginLeft",offset:"offsetLeft",otherSize:"offsetHeight",size:"offsetWidth",page:"pageX"}:e._settings={clientSize:"clientHeight",dimension:"height",leftOrTop:"top",margin:"marginTop",offset:"offsetTop",otherSize:"offsetWidth",size:"offsetHeight",page:"pageY"}}_setInitialComponentDisplay(){const e=this;switch(e.scalePosition){case"near":e.$scaleNear.removeClass("smart-hidden"),e.$scaleFar.addClass("smart-hidden");break;case"far":e.$scaleNear.addClass("smart-hidden"),e.$scaleFar.removeClass("smart-hidden");break;case"both":e.$scaleFar.removeClass("smart-hidden"),e.$scaleNear.removeClass("smart-hidden");break;case"none":e.$scaleFar.addClass("smart-hidden"),e.$scaleNear.addClass("smart-hidden")}e.$tooltip.addClass("smart-hidden"),"track"===e.ticksPosition&&e.$trackTicksContainer.removeClass("smart-hidden")}_styleChangedHandler(){const e=this;e._isVisible()?e._renderingSuspended?e._createElement():e._renderingSuspended||(e._setTicksAndInterval(),e._moveThumbBasedOnValue(e._drawValue)):e._renderingSuspended=!0}_validateInitialPropertyValues(){const e=this,t=typeof e.value===String?e.value.replace(/\s/g,""):e.value.toString().replace(/\s/g,"");"numeric"===e.mode&&e._numericProcessor.regexScientificNotation.test(t)&&(e.value=e._numericProcessor.scientificToDecimal(t),delete e._valueBeforeCoercion),e.significantDigits=null!==e.significantDigits?Math.min(Math.max(e.significantDigits,1),21):null,null===e.significantDigits&&null===e.precisionDigits?e.significantDigits=8:null!==e.significantDigits&&null!==e.precisionDigits&&e.error(e.localize("significantPrecisionDigits",{elementType:e.nodeName.toLowerCase()})),e._validateMinMax("both",!0),e.showTooltip&&e.showThumbLabel&&(e.showTooltip=!1)}_validateMinMax(e,t,a){const i=this;let r="min"===e||"both"===e,n="max"===e||"both"===e;function s(e,a){i._numericProcessor.validateMinMax("min"===e||t,"max"===e||t);const s=i["_"+e+"Object"];("min"===e?i._numericProcessor.compare(i.max,s,!0)<=0:i._numericProcessor.compare(i.min,s,!0)>0)?a?(i._numberRenderer=new Smart.Utilities.NumberRenderer(a),"min"===e?r=!1:n=!1,i[e]=a,i["_"+e+"Object"]=a):i.error(i.localize("invalidMinOrMax",{elementType:i.nodeName.toLowerCase(),property:e})):(i._numberRenderer=new Smart.Utilities.NumberRenderer(s),i[e]=i["_"+e+"Object"])}void 0===typeof t&&(t=!1),"both"===e?(s("min",a),s("max",a)):s(e,a),i.logarithmicScale?i._validateOnLogarithmicScale(r,n,a):(i._drawMin=i.min,i._drawMax=i.max),i.min=i.min.toString(),i.max=i.max.toString(),i._minObject=i._numericProcessor.createDescriptor(i.min),i._maxObject=i._numericProcessor.createDescriptor(i.max),"date"===i.mode&&(i._minDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.min),i._maxDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.max)),i._numericProcessor.validateInterval(i.interval),i.customInterval&&i._numericProcessor.validateCustomTicks(),i._setAriaValue("valueminmax")}_calculateTickInterval(){const e=this;let t=e._tickIntervalHandler.getInterval("linear",e._drawMin,e._drawMax,e.$.track,e.logarithmicScale);t.major!==e._majorTicksInterval?(e._intervalHasChanged=!0,e._majorTicksInterval=t.major):e._intervalHasChanged=!0,e._minorTicksInterval=t.minor,"date"===e.mode&&e._calculateDateInterval(t.major)}_calculateDateInterval(e){const t=this,a={month:"2628000000000000000000000000000",day:"86400000000000000000000000000",hour:"3600000000000000000000000000",minute:"60000000000000000000000000",second:"1000000000000000000000000"};let i="year",r=new Smart.Utilities.BigNumber("31536000000000000000000000000000"),n=r.subtract(e).abs(),s=new Smart.Utilities.BigNumber(t.min).subtract(t.max).abs(),o=s.divide(e).toString();o<2&&(e=s.divide(3));for(let t in a)if(Object.prototype.hasOwnProperty.call(a,t)){const s=new Smart.Utilities.BigNumber(a[t]),o=s.subtract(e).abs();if(-1!==o.compare(n))break;i=t,r=s,n=o}if("second"===i){if(t._numberRenderer.numericValue=parseFloat(e),t._numberRenderer.numericValue<1e3)return t._dateIncrementMethod="addYoctoseconds",void(t._dateIntervalNumber=1);let a=t._numberRenderer.toScientific(10);return a=a.charAt(a.length-1),t._dateIncrementMethod=t._unitToMethod[a],void(t._dateIntervalNumber=Math.pow(10,t._numericProcessor.prefixesToPowers[a]))}t._dateInterval=!0;const l=!t.customInterval;let c,d,m;switch(l&&(c=[new Smart.Utilities.BigNumber(t.min)],d=s.divide(r).toString(),m=Math.max(1,Math.floor(d/o))),i){case"year":if(l)for(let e=t._minDate.year()+m;e<t._maxDate.year();e+=m)c.push(new Smart.Utilities.BigNumber(new Smart.Utilities.DateTime(e,1,1).getTimeStamp()));t._dateIncrementMethod="addYears";break;case"month":if(l)for(let e=new Smart.Utilities.DateTime(t._minDate.year(),t._minDate.month()+m,1);-1===e.compare(t._maxDate);e.addMonths(m,!1))c.push(new Smart.Utilities.BigNumber(e.getTimeStamp()));t._dateIncrementMethod="addMonths";break;case"day":if(l)for(let e=new Smart.Utilities.DateTime(t._minDate.year(),t._minDate.month(),t._minDate.day()+m);-1===e.compare(t._maxDate);e.addDays(m,!1))c.push(new Smart.Utilities.BigNumber(e.getTimeStamp()));t._dateIncrementMethod="addDays",t._dateIntervalNumber=864e26;break;case"hour":if(l)for(let e=new Smart.Utilities.DateTime(t._minDate.year(),t._minDate.month(),t._minDate.day(),t._minDate.hour()+m);-1===e.compare(t._maxDate);e.addHours(m,!1))c.push(new Smart.Utilities.BigNumber(e.getTimeStamp()));t._dateIncrementMethod="addHours",t._dateIntervalNumber=36e26;break;case"minute":if(l)for(let e=new Smart.Utilities.DateTime(t._minDate.year(),t._minDate.month(),t._minDate.day(),t._minDate.hour(),t._minDate.minute()+m);-1===e.compare(t._maxDate);e.addMinutes(m,!1))c.push(new Smart.Utilities.BigNumber(e.getTimeStamp()));t._dateIncrementMethod="addMinutes",t._dateIntervalNumber=6e25}l&&(-1===c[c.length-1].compare(t.max)&&c.push(new Smart.Utilities.BigNumber(t.max)),t.customTicks=c)}_formatNumber(e){const t=this;if("date"===t.mode)return Smart.Utilities.DateTime.fromFullTimeStamp(e).toString(t.dateLabelFormatString);const a=t._numberRenderer;let i=parseFloat(e);if(a.numericValue=e,t.scientificNotation)i=t._numberRenderer.toScientific(t.significantDigits,t.precisionDigits);else switch(t.scaleType){case"floatingPoint":i=t._applyDecimalSeparator(a.toDigits(t.significantDigits,t.precisionDigits));break;case"integer":i=a.isENotation(i)?Math.round(a.largeExponentialToDecimal(i)):Math.round(i),i=a.toDigits(t.significantDigits,0)}return i}_formatLabel(e,t){const a=this;let i;return a.labelFormatFunction&&("date"===a.mode&&(e=Smart.Utilities.DateTime.fromFullTimeStamp(e)),i=a.labelFormatFunction(e),void 0!==i&&""!==i)||(i=a._formatNumber(e),a._numberRenderer=new Smart.Utilities.NumberRenderer(i),a.showUnit&&(i+=!1!==t?' <span class="smart-unselectable">'+a.unit+"</span>":" "+a.unit)),i}_layout(){const e=this,t=e.$.container.style,a=e._tickIntervalHandler.labelsSize.minLabelSize/2+"px",i=e._tickIntervalHandler.labelsSize.maxLabelSize/2+"px";switch(e.orientation){case"horizontal":if("none"===e.scalePosition){t.paddingLeft="",t.paddingRight="";break}!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(t.paddingLeft=a,t.paddingRight=i):(t.paddingLeft=i,t.paddingRight=a);break;case"vertical":if("none"===e.scalePosition){t.paddingTop="",t.paddingBottom="";break}e.inverted?(t.paddingBottom=i,t.paddingTop=a):(t.paddingBottom=a,t.paddingTop=i)}e._measurements.trackLength=e.$.track[this._settings.clientSize]}_trackDownHandler(e){const t=this;t.disabled||t.readonly||!Smart.Utilities.Core.isMobile&&0!==e.button||("switchUntilReleased"===t.mechanicalAction&&(t._cachedValue={},t._cachedValue._number=t._number,t._cachedValue._drawValue=t._drawValue,t._cachedValue.value=t.value,t._valueDate&&(t._cachedValue._valueDate=t._valueDate)),t._getTrackStartAndEnd(),t._moveThumbBasedOnCoordinates(e,!0,"switchWhenReleased"!==t.mechanicalAction),t._thumbDragged=!0,t.$track.addClass("smart-dragged"),t.showTooltip&&t.$tooltip.removeClass("smart-hidden"))}_trackMoveHandler(e){"touchmove"===e.originalEvent.type&&e.originalEvent.preventDefault()}_documentMoveHandler(e){const t=this;t._thumbDragged&&(e.originalEvent.preventDefault(),t._moveThumbBasedOnCoordinates(e,!0,"switchWhenReleased"!==t.mechanicalAction),t.$fill.addClass("disable-animation"))}_documentUpHandler(e){const t=this;if(t._thumbDragged){if("switchWhenReleased"===t.mechanicalAction)t._moveThumbBasedOnCoordinates(e,!0,!0);else if("switchUntilReleased"===t.mechanicalAction&&t._numericProcessor.compare(t._number,t._cachedValue._number)){const e=t._getEventValue();t._number=t._cachedValue._number,t._drawValue=t._cachedValue._drawValue,t._cachedValue._valueDate&&(t._valueDate=t._cachedValue._valueDate),t.value=t._cachedValue.value,t._moveThumbBasedOnValue(t._drawValue);const a=t._getEventValue();t.$.fireEvent("change",{value:a,oldValue:e}),t._updateTargetValue(),t.$.hiddenInput.value=a,t._setAriaValue("valuenow")}t.showTooltip&&t.$tooltip.addClass("smart-hidden"),t._thumbDragged=!1,t.$track.removeClass("smart-dragged"),t.$fill.removeClass("disable-animation")}}_selectStartHandler(e){this._thumbDragged&&e.preventDefault()}refresh(){this._resizeHandler()}_resizeHandler(){const e=this;e._isVisible()?e._renderingSuspended?e._createElement():e._renderingSuspended||(!0!==e._orientationChanged&&(e._setTicksAndInterval(),e._moveThumbBasedOnValue(e._drawValue)),e._trackChanged&&(e._measurements.trackLength=e.$.track[this._settings.clientSize],e._setTicksAndInterval(),e._moveThumbBasedOnValue(e._drawValue)),e._setTrackSize(),delete e._orientationChanged,delete e._trackChanged):e._renderingSuspended=!0}_moveThumbBasedOnCoordinates(e,t,a){const i=this;let r=t?Math.min(Math.max(e[i._settings.page],i._trackStart),i._trackEnd):e[i._settings.page],n=i._numericProcessor.pxToValue(r);i.logarithmicScale?(i._drawValue=Math.log10(n),n=i._numericProcessor.getCoercedValue(i._drawValue)):(i._drawValue=n,n=i._numericProcessor.getCoercedValue(n)),r=Math.min(Math.max(i._numericProcessor.valueToPx(n)+i._trackStart,i._trackStart),i._trackEnd);const s=r-i._trackStart;i.updateFillSizeAndPosition(s,i._settings.margin,n,!0,a),e.originalEvent&&e.originalEvent.stopPropagation()}_moveThumbBasedOnValue(e){const t=this,a=t._numericProcessor.valueToPx(t._numericProcessor.getCoercedValue(e));t.updateFillSizeAndPosition(a,t._settings.margin,e,!0)}updateFillSizeAndPosition(e,t,a,i,r){const n=this,s=n.$.fill.style;if(n._normalLayout?s[n._settings.dimension]=e+"px":(s[n._settings.dimension]=Math.min(n._measurements.trackLength,Math.max(0,n._measurements.trackLength-e))+"px",s[t]=e+"px"),i){const e=n.value;delete n._valueBeforeCoercion,n._numericProcessor.updateToolTipAndValue(a,e,r)}}_updateTooltipValue(e){const t=this;void 0===e&&(e=t.value),t.logarithmicScale&&(e=Math.pow(10,e.toString())),e=t._formatLabel(e),t.$.tooltipContent.innerHTML=e,t.$.thumbLabel.innerHTML=e}_getSize(e,t){const a=this,i=window.getComputedStyle(a),r=window.getComputedStyle(a.$.track),n=a._trackSize+parseFloat(r[t.marginA])+parseFloat(r[t.marginB]);let s,o,l,c,d,m,u;function _(e,t){const a=e.getElementsByClassName("smart-label");s=a[0],o=a[a.length-1];const i=window.getComputedStyle(a[0])[t];l+=parseFloat(i)}switch(l=n,a.scalePosition){case"none":return l+=parseFloat(i[t.paddingA])+parseFloat(i[t.paddingB]),c=void 0!==a._tankSizeBeforeOrientation?"horizontal"===a.orientation?a._tankSizeBeforeOrientation.height:a._tankSizeBeforeOrientation.width:"horizontal"===a.orientation?parseFloat(r.width):parseFloat(r.height),!0!==a._trackChanged&&(a._trackChanged=!0),{optimalSize:l,optimalOtherSize:c};case"near":l+=e,_(a.$.scaleNear,t.nearScaleDistance);break;case"far":l+=e,_(a.$.scaleFar,t.farScaleDistance);break;case"both":l+=2*e,_(a.$.scaleNear,t.nearScaleDistance),_(a.$.scaleFar,t.farScaleDistance)}return l+=parseFloat(i[t.paddingA])+parseFloat(i[t.paddingB]),d=s.getBoundingClientRect(),m=o.getBoundingClientRect(),c=a[t.offset],u=d[t.distance]+s[t.offset]-m[t.distance],u>0&&(c=s[t.offset]+o[t.offset]),{optimalSize:l,optimalOtherSize:c}}_getRange(){const e=this;e.logarithmicScale?e._range=e._drawMax-e._drawMin:"floatingPoint"===e.scaleType?e._range=(e._drawMax-e._drawMin).toString():e._range=new Smart.Utilities.BigNumber(e._drawMax).subtract(e._drawMin).toString()}_getTrackStartAndEnd(){const e=this;let t,a=e.$.track.getBoundingClientRect();if("horizontal"===e.orientation){const e=document.body.scrollLeft||document.documentElement.scrollLeft;t=a.left+e}else{const e=document.body.scrollTop||document.documentElement.scrollTop;t=a.top+e}const i=t+e._measurements.trackLength,r=i-t;e._trackStart=t,e._trackEnd=i,e._valuePerPx=e._numericProcessor.getValuePerPx(e._range,r)}_updateScaleWidth(e){const t=this;let a="track"===t.ticksPosition?4:12;switch(t.labelsVisibility){case"all":e=t._numericProcessor._longestLabelSize;break;case"endPoints":e=Math.max(t._tickIntervalHandler.labelsSize.minLabelOtherSize,t._tickIntervalHandler.labelsSize.maxLabelOtherSize);break;case"none":e=0}let i=a+e,r=window.getComputedStyle(t.$.track);if(Boolean(r.getPropertyValue("--smart-tank-scale-size")))t.$.container.style.setProperty("--smart-tank-scale-size",i+"px");else{const e=window.getComputedStyle(t),a=t.$.scaleNear.style,n=t.$.scaleFar.style,s=t.$.track.style,o=parseFloat(r.getPropertyValue("min-width"));let l,c,d,m,u,_=(parseFloat(r.getPropertyValue("outline-width"))||0)+(parseFloat(r.getPropertyValue("outline-offset"))||0);switch(t.orientation){case"horizontal":l="height",c="width",d=t.offsetHeight,u=parseFloat(e.getPropertyValue("padding-top"))+parseFloat(e.getPropertyValue("padding-bottom")),m=parseFloat(r.getPropertyValue("margin-top"))+parseFloat(r.getPropertyValue("margin-bottom"));break;case"vertical":l="width",c="height",d=t.offsetWidth,u=parseFloat(e.getPropertyValue("padding-left"))+parseFloat(e.getPropertyValue("padding-right")),m=parseFloat(r.getPropertyValue("margin-left"))+parseFloat(r.getPropertyValue("margin-right"))}switch(t.scalePosition){case"near":a.setProperty(l,i+"px"),s.setProperty(l,Math.max(isNaN?0:o,d-u-i-4-m-_)+"px");break;case"far":n.setProperty(l,i+"px"),s.setProperty(l,Math.max(isNaN?0:o,d-u-i-4-m-_)+"px");break;case"both":a.setProperty(l,i+"px"),n.setProperty(l,i+"px"),s.setProperty(l,Math.max(isNaN?0:o,d-u-2*i-4-m-_)+"px");break;case"none":s.setProperty(l,"")}s.setProperty(c,"100%"),a.setProperty(c,"100%"),n.setProperty(c,"100%")}}_appendTicksAndLabelsToScales(e,t){const a=this;function i(i){i.innerHTML=t,"scale"===a.ticksPosition&&(i.innerHTML+=e)}switch(a.scalePosition){case"near":i(a.$.scaleNear);break;case"far":i(a.$.scaleFar);break;case"both":i(a.$.scaleNear),i(a.$.scaleFar)}"track"===a.ticksPosition&&(a.$.trackTicksContainer.innerHTML=e)}_discardDecimalSeparator(e,t){if(void 0===t&&(t=this.decimalSeparator),"."!==t){let a=new RegExp(t,"g");return"string"==typeof e?e.replace(a,"."):e.toString().replace(a,".")}return e}_applyDecimalSeparator(e){const t=this;return"string"!=typeof e&&(e=e.toString()),"."!==t.decimalSeparator&&(e=e.replace(/\./g,t.decimalSeparator)),e}_validate(e,t,a,i){const r=this;let n,s,o;r._programmaticValueIsSet=i&&"interaction"===r.validation,n=e?r.value:t,!0!==a&&r.coerce?(s=r._numericProcessor.createDescriptor(n,!0,!0,!0),s=r.logarithmicScale?Math.pow(10,r._numericProcessor.getCoercedValue(Math.log10(s))):r._numericProcessor.getCoercedValue(s),o=s):"strict"===r.validation||!e&&!r._programmaticValueIsSet?(s=r._numericProcessor.createDescriptor(n,!0,!0,!0),o=s):(s=r._numericProcessor.createDescriptor(n,!0,!0,!1),o=r._numericProcessor.validate(s,r._minObject,r._maxObject)),r._numericProcessor.regexScientificNotation.test(o)&&(o=r._numericProcessor.scientificToDecimal(o)),o=r._discardDecimalSeparator(o,r.decimalSeparator),e?(r._number=o,r._drawValue=r.logarithmicScale?Math.log10(o):o,"numeric"===r.mode?r.value=s.toString():(r._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(s),r.value=s),delete r._valueBeforeCoercion,r._moveThumbBasedOnValue(r._drawValue)):r._numericProcessor.updateValue(s),r._programmaticValueIsSet=!1}_changeScaleType(){const e=this;e._numericProcessor=new Smart.Utilities.NumericProcessor(e,"scaleType"),e._validateMinMax("both"),e._setTicksAndInterval(),e._scaleTypeChangedFlag=!0,e._validate(!0,e._number.toString()),e._scaleTypeChangedFlag=!1}_setTicksAndInterval(){const e=this;if(!e._isVisible()||e._renderingSuspended)return void(e._renderingSuspended=!0);let t=e._formatLabel(e.min),a=e._formatLabel(e.max);e._getRange(),e._tickIntervalHandler=new Smart.Utilities.TickIntervalHandler(e,t,a,"smart-label",e._settings.size,"integer"===e.scaleType,e.logarithmicScale),e._layout(),e.customInterval?("date"===e.mode&&e._calculateTickInterval(),e._intervalHasChanged=!0,e._numericProcessor.addCustomTicks()):(e._calculateTickInterval(),e._dateInterval?(e._intervalHasChanged=!0,e._numericProcessor.addCustomTicks()):e._numericProcessor.addTicksAndLabels())}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.removeAttribute("tabindex"):e.tabIndex=e.tabIndex>0?e.tabIndex:0}_keyIncrementDecrement(e,t){const a=this,i="add"===e?1:-1,r=void 0===t;if(r&&(t=a.logarithmicScale?new Smart.Utilities.BigNumber(a._drawValue):a._drawValue),a.customInterval&&a.coerce){let n,s;r&&(a.logarithmicScale&&(t=a.value),"numeric"===a.mode&&(t=t.toString())),"numeric"===a.mode?(n=-1!==a.customTicks.indexOf(a.min)?a.customTicks.slice(0):[a.min].concat(a.customTicks),s=n.indexOf(t)):(n=-1!==a.customTicks.findIndex((function(e){return 0===e.compare(a._drawMin)}))?a.customTicks.slice(0):[a._drawMin].concat(a.customTicks),s=n.findIndex((function(e){return 0===e.compare(t)})));const o=n[s+1*i];return void 0!==o?o:t===a.max&&"subtract"===e?n[n.length-2]:t}if("numeric"===a.mode){let i=a._numericProcessor.incrementDecrement(t,e,a._validInterval);return a.logarithmicScale&&(a._drawValue=i,i=Math.pow(10,Math.round(i))),i}return"interaction"!==a.validation||-1!==a._valueDate.compare(a._minDate)&&1!==a._valueDate.compare(a._maxDate)||(a._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(a._drawValue)),a._valueDate[a._dateIncrementMethod](i*parseFloat(a.interval),!1),a._drawValue=new Smart.Utilities.BigNumber(a._valueDate.getTimeStamp()),-1===a._drawValue.compare(a._drawMin)&&(a._drawValue=new Smart.Utilities.BigNumber(a._drawMin),a._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(a._drawValue)),1===a._drawValue.compare(a._drawMax)&&(a._drawValue=new Smart.Utilities.BigNumber(a._drawMax),a._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(a._drawValue)),a._drawValue}_keydownHandler(e){const t=this;if(t.disabled||t.readonly)return;const a=e.charCode?e.charCode:e.which;if(-1===[35,36,37,38,39,40].indexOf(a))return;const i=[35,38,39].indexOf(a)>-1,r=[36,37,40].indexOf(a)>-1;if(e.preventDefault(),"floatingPoint"===t.scaleType){if(parseFloat(t.value)<=parseFloat(t.min)&&r||parseFloat(t.value)>=parseFloat(t.max)&&i)return}else{let e=new Smart.Utilities.BigNumber(t._drawValue);if(1!==e.compare(t._drawMin)&&r||-1!==e.compare(t._drawMax)&&i)return}let n;switch(a){case 40:case 37:n=t._keyIncrementDecrement("subtract");break;case 38:case 39:n=t._keyIncrementDecrement("add");break;case 36:t._drawValue=t._drawMin,n=t.min;break;case 35:t._drawValue=t._drawMax,n=t.max}return t._validate(!1,n,a),!1}_setDrawVariables(){const e=this;e.logarithmicScale?(e._drawValue=Math.log10(e.value),e._drawMin=Math.log10(e.min),e._drawMax=Math.log10(e.max)):(e._drawValue=e.value,e._drawMin=e.min,e._drawMax=e.max)}_validateOnLogarithmicScale(e,t){const a=this;function i(e){return Math.pow(10,Math.round(Math.log10(e)-Math.log10(5.5)+.5))}if(e)if(a.min<=0)a.min=1,a._drawMin=0;else if(Math.log10(a.min)%1!=0){let e=i(parseFloat(a.min));e>a.min&&(e/=10),a._drawMin=Math.log10(a.min)}else a._drawMin=Math.log10(a.min);if(t)if(a.max<=0)a.max=1,a._drawMax=0;else if(Math.log10(a.max)%1!=0){let e=i(parseFloat(a.max));e<a.max&&(e*=10),a._drawMax=Math.log10(a.max)}else a._drawMax=Math.log10(a.max);"integer"===a.scaleType&&(a._drawMin<0&&(a._drawMin=0,a.min=1),a._drawMax<0&&(a._drawMax=1,a.max=10)),a._drawMax===a._drawMin&&(a._drawMax=a._drawMin+1)}_getLayoutType(){const e=this,t=e.orientation,a=e.inverted,i=e.rightToLeft;e._normalLayout="horizontal"===t&&(!a&&!i||i&&a)||"vertical"===t&&a}_trackOnMouseEnterHandler(){const e=this;e.readonly||e.disabled||(e.$track.addClass("track-hovered"),e.$.track.setAttribute("hover",""))}_trackOnMouseLeaveHandler(){const e=this;e.readonly||e.disabled||(e.$track.removeClass("track-hovered"),e.$.track.removeAttribute("hover"))}_isVisible(){const e=this;return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}_coerceCustomInterval(){const e=this;if(!e.coerce)return;const t=e._valueBeforeCoercion,a=e.logarithmicScale?Math.pow(10,e._numericProcessor.getCoercedValue(Math.log10(e.value))):e._numericProcessor.getCoercedValue(e.value);e._validate(!1,a,!0,!0),e._valueBeforeCoercion=t}_handleDateScale(){const e=this,t=Smart.Utilities.DateTime;t||e.error(e.localize("missingReference",{elementType:e.nodeName.toLowerCase(),files:"smart.date.js"})),e._customTicks=e.customTicks,e._unitToMethod={Y:"addSeconds",Z:"addMilliseconds",E:"addMicroseconds",P:"addNanoseconds",T:"addPicoseconds",G:"addFemtoseconds",M:"addAttoseconds",k:"addZeptoseconds"},e._minDate=t.validateDate(e.min),e.min=e._minDate.getTimeStamp(),e._maxDate=t.validateDate(e.max),e.max=e._maxDate.getTimeStamp(),e.rangeSlider||(e._valueDate=t.validateDate(e.value),e.value=e._valueDate.getTimeStamp()),e._properties.min.serialize="_serializeMin",e._properties.max.serialize="_serializeMax",e._properties.value.serialize="_serializeValue",e.scaleType="integer",e.logarithmicScale=!1,e.wordLength="uint64";const a=["min","max","value"];for(let t=0;t<a.length;t++){const i=a[t];Object.defineProperty(e,i,{get:function(){return e.context===e?e.properties[i].value:e["_"+i+"Date"]},set(t){e.updateProperty(e,e._properties[i],t)}})}e._getEventValue=function(t){return t?(e.setAttribute("aria-valuetext",e._valueDate.toString("f")),e.value.toString()):e._valueDate.clone()}}_serializeMin(){return this._minDate.toString()}_serializeMax(){return this._maxDate.toString()}_serializeValue(){return this._valueDate.toString()}_redefineProperty(e){const t=this;Object.defineProperty(t,e,{get:function(){return t.properties[e].value},set(a){function i(e,t){return t instanceof Smart.Utilities.BigNumber?t.toString():t}const r=t.properties[e].value;if(JSON.stringify(r,i)!==JSON.stringify(a,i)&&(t.properties[e].value=a,t.isReady&&(!t.ownerElement||t.ownerElement&&t.ownerElement.isReady)&&t.context!==t)){const i=t.context;t.context=t,t.propertyChangedHandler(e,r,a),t.context=i}}})}_setAriaValue(e){const t=this;"valuenow"===e?t.setAttribute("aria-valuenow",t._getEventValue(!0)):(t.setAttribute("aria-valuemin",t.min.toString()),t.setAttribute("aria-valuemax",t.max.toString()))}});
/***/ }),
/***/ 7325:
/***/ (() => {
Smart.Utilities.Assign("TickIntervalHandler",class{constructor(e,t,i,a,l,s,n){const r=this;r.context=e,r.minLabel=t,r.maxLabel=i,r.labelClass=a,r.dimension=l,r.logarithmic=n,e.customInterval?e.customTicks.length>0?r.labelsSize=r.getCustomTicksLabelSize():r.labelsSize={minLabelSize:0,minLabelOtherSize:0,maxLabelSize:0,maxLabelOtherSize:0}:r.labelsSize=r.getMinAndMaxLabelSize(),s?(r.getNiceInterval=r.getNiceIntervalInteger,r.getPossibleBiggerLabel=r.getPossibleBiggerLabelInteger):(r.getNiceInterval=r.getNiceIntervalFloatingPoint,r.getPossibleBiggerLabel=r.getPossibleBiggerLabelFloatingPoint)}getInterval(e,t,i,a){const l=this.context,s=l._measurements.innerRadius;let n,r,o=1;"radial"===e?(n=Math.max(this.labelsSize.minLabelSize,this.labelsSize.minLabelOtherSize,this.labelsSize.maxLabelSize,this.labelsSize.maxLabelOtherSize),o=1.35):(n=Math.max(this.labelsSize.minLabelSize,this.labelsSize.maxLabelSize),o=1.45),n*=o,r="radial"===e?function(){let e=2*Math.PI*s*(Math.abs(l.startAngle-l.endAngle)/360);return Math.round(e)}():l[this.dimension]-this.labelsSize.minLabelSize/2-this.labelsSize.maxLabelSize/2,r=Math.max(10,r);const m=Math.ceil(r/n),b="radial"===e?4*m:3*m;let h=this.getNiceInterval(t,i,m,!0),g=this.getNiceInterval(t,i,b);if(l._cachedLabelsSize=this.labelsSize,m>2&&!l.customInterval){const s=this.getPossibleBiggerLabel(m,h);if(s.length>Math.max(this.minLabel.length,this.maxLabel.length)){const n=this.minLabel;this.minLabel=s,this.labelsSize=this.getMinAndMaxLabelSize(),l._cachedLabelsSize=this.labelsSize;const r=this.getInterval(e,t,i,a);return this.minLabel=n,this.labelsSize=this.getMinAndMaxLabelSize(),r}}return{major:h,minor:g}}getNiceIntervalFloatingPoint(e,t,i,a){const l=t-e,s=Math.floor(Math.log10(l)-Math.log10(i));let n,r=Math.pow(10,s),o=i*r;n=l<2*o?1:l<3*o?2:l<7*o?5:10;let m=n*r;if(a&&this.context._range/m>i){switch(n){case 5:n=10;break;case 2:n=5;break;case 1:n=2}m=n*r}return this.nearestPowerOfTen=r,this.logarithmic&&a?Math.max(1,m):m}getPossibleBiggerLabelFloatingPoint(e,t){const i=this.context;let a,l,s=parseFloat(i.min-i._numericProcessor.getPreciseModulo(parseFloat(i.min),t)+parseFloat(t)),n=s;this.logarithmic&&(s=Math.pow(10,s)),a=i._formatLabel(s);for(let s=1;s<e&&(n+=t,!(n>=i._drawMax));s++)l=this.logarithmic?Math.pow(10,n):n,l=i._formatLabel(l),l.length>a.length&&(a=l);return a}getNiceIntervalInteger(e,t,i,a){const l=new Smart.Utilities.BigNumber(t).subtract(new Smart.Utilities.BigNumber(e)),s=Math.floor(Math.log10(l.toString())-Math.log10(i)),n=new Smart.Utilities.BigNumber(10).pow(new Smart.Utilities.BigNumber(s)),r=new Smart.Utilities.BigNumber(i).multiply(n);let o;o=-1===l.compare(new Smart.Utilities.BigNumber(2*r))?1:-1===l.compare(new Smart.Utilities.BigNumber(3*r))?2:-1===l.compare(new Smart.Utilities.BigNumber(7*r))?5:10;let m=new Smart.Utilities.BigNumber(o).multiply(n);if(a&&1===new Smart.Utilities.BigNumber(this.context._range).divide(m).compare(i)){switch(o){case 5:o=10;break;case 2:o=5;break;case 1:o=2}m=new Smart.Utilities.BigNumber(o).multiply(n)}return-1===m.compare(1)&&(m=new Smart.Utilities.BigNumber(1)),this.nearestPowerOfTen=n,m}getPossibleBiggerLabelInteger(e,t){const i=this.context,a=new Smart.Utilities.BigNumber(10);let l,s,n=new Smart.Utilities.BigNumber(i.min).subtract(new Smart.Utilities.BigNumber(i.min).mod(t)).add(t),r=n;this.logarithmic&&(n=a.pow(n)),l=i._formatLabel(n);for(let n=1;n<e&&(r=r.add(t),-1===r.compare(i._drawMax));n++)s=this.logarithmic?a.pow(r):r,s=i._formatLabel(s),s.length>l.length&&(l=s);return l}getMinAndMaxLabelSize(){const e=this,t=e.context,i=t.$.container,a=document.createElement("span");a.className=e.labelClass,a.style.position="absolute",a.style.visibility="hidden",i.appendChild(a),a.innerHTML=e.minLabel;const l=a[e.dimension],s=a[t._settings.otherSize];a.innerHTML=e.maxLabel;const n=a[e.dimension],r=a[t._settings.otherSize];return i.removeChild(a),{minLabelSize:l,minLabelOtherSize:s,maxLabelSize:n,maxLabelOtherSize:r}}getCustomTicksLabelSize(){const e=this,t=e.context,i=t.$.container,a=document.createElement("span"),l=t.customTicks;a.className=e.labelClass,a.style.position="absolute",a.style.visibility="hidden",i.appendChild(a),a.innerHTML=t._formatLabel(l[0]);let s=a[e.dimension],n=a[t._settings.otherSize];for(let i=1;i<t.customTicks.length;i++){a.innerHTML=t._formatLabel(t.customTicks[i]);const l=a[e.dimension],r=a[t._settings.otherSize];l>s&&(s=l),r>n&&(n=r)}return i.removeChild(a),{minLabelSize:s,minLabelOtherSize:n,maxLabelSize:s,maxLabelOtherSize:n}}});
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/* unused harmony export smartTank */
/* harmony import */ var _smart_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6321);
/* harmony import */ var _smart_element_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_smart_element_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _smart_button_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2612);
/* harmony import */ var _smart_button_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_smart_button_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _smart_scrollbar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9135);
/* harmony import */ var _smart_scrollbar_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_smart_scrollbar_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _smart_math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8687);
/* harmony import */ var _smart_math_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_smart_math_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _smart_numeric_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2754);
/* harmony import */ var _smart_numeric_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_smart_numeric_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _smart_date_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2052);
/* harmony import */ var _smart_date_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_smart_date_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _smart_tickintervalhandler_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7325);
/* harmony import */ var _smart_tickintervalhandler_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_smart_tickintervalhandler_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _smart_tank_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5478);
/* harmony import */ var _smart_tank_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_smart_tank_js__WEBPACK_IMPORTED_MODULE_7__);
/* Smart UI v15.2.0 (2023-04-20)
Copyright (c) 2011-2023 jQWidgets.
License: https://htmlelements.com/license/ */ //
class smartTank extends Smart.Component {
get name() {
return 'smartTank';
}
}
})();
/******/ })()
;