smart-webcomponents
Version:
Web Components & Custom Elements for Professional Web Applications
27 lines (16 loc) • 141 kB
JavaScript
/* Smart UI v22.0.10 (2025-02-10)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */ //
(function(){ if (typeof document === 'undefined') { return; }
/* Smart UI v19.1.1 (2024-June)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 3553:
/***/ (() => {
(()=>{"use strict";const e="Smart";class t{static get moduleName(){return"BindingModule"}getBindings(e,t){const n=this;let o=0,i={},r=(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.ownerElement&&e.parentNode===n.ownerElement.$.content&&(t.value=""!==n.ownerElement.$.html?n.ownerElement.$.html:void 0,n.ownerElement.innerHTML=""),{textContent:t}}})(e);r&&(i.data=r),t||(i.mapping=[],t=i),e.getAttribute&&(i.nodeId=e.getAttribute("smart-id"),t&&r&&(t.mapping[i.nodeId]=r)),i.node=e,e.firstChild&&(i.children={});for(let r=e.firstChild;r;r=r.nextSibling)i.children[o++]=n.getBindings(r,t);return i}_addRemovePropertyBinding(e,t,n,o,i){if(!e||!t||!n)return;const r=this,a=r.ownerElement.bindings,d=n.getAttribute("smart-id"),l=e.indexOf("{{")>=0;let s=!1;(e=e.replace("{{","").replace("}}","").replace("[[","").replace("]]","")).indexOf("!")>=0&&(e=e.replace("!",""),s=!0);const c=r.ownerElement._properties[e],p={name:e,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:s};if(i&&!o){const n={},o={name:e,targetPropertyName:t,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:s};n[e]=o,a.mapping[d]=n}const u=function(e){for(let i in e){const a=e[i];if(a.nodeId===d){a.data||(a.data={}),o?(a.data[t]=null,delete a.data[t]):a.data[t]=p;break}if(a.children)u(a.children);else if(a.node&&a.node.children&&a.node===n.parentElement){const e=a.node;if(!e.firstChild)continue;a.children={};let t=0;for(let n=e.firstChild;n;n=n.nextSibling)a.children[t++]=r.getBindings(n);u(a.children)}}};u(a.children),o?delete r.ownerElement.boundProperties[e]:r.ownerElement.boundProperties[e]=!0,r.updateBoundNodes(e)}addPropertyBinding(e,t,n,o){this._addRemovePropertyBinding(e,t,n,!1,o)}removePropertyBinding(e,t,n,o){this._addRemovePropertyBinding(e,t,n,!0,o)}parseAttributes(e){const n=this;let o;for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i],a=r.name,d=r.value;t.cache["toCamelCase"+a]||(t.cache["toCamelCase"+a]=window.Smart.Utilities.Core.toCamelCase(a));const l=t.cache["toCamelCase"+a];if(a.indexOf("(")>=0){let t=a.substring(1,a.length-1);if(n.ownerElement&&!n.ownerElement.dataContext){n.ownerElement.templateListeners[e.getAttribute("smart-id")+"."+t]=d,e.removeAttribute(a);continue}{o||(o={});const e=d.substring(0,d.indexOf("("));o[l]={isEvent:!0,name:t,value:e};continue}}let s=n.parseProperty(d,a,e);s&&(o||(o={}),o[l]=s)}return o}parseProperty(e,t){if(!e||!e.length)return;const n=this;let o,i=e.length,r=0,a=0,d=0,l=!0;for(;a<i;){r=e.indexOf("{{",a);let t=e.indexOf("[[",a),n="}}";if(t>=0&&(r<0||t<r)&&(r=t,l=!1,n="]]"),d=r<0?-1:e.indexOf(n,r+2),d<0)return;o=o||{};let i=e.slice(r+2,d).trim();o.name=i,a=d+2}const s=o.name,c=n.ownerElement?n.ownerElement._properties[s]:null;if(o.twoWay=l,o.ready=!1,n.ownerElement&&(s.indexOf("::")>=0?n.ownerElement.boundProperties[s.substring(0,s.indexOf("::"))]=!0:n.ownerElement.boundProperties[s]=!0),c)o.type=c.type,o.reflectToAttribute=c.reflectToAttribute;else{["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(t)>=0?o.type="boolean":o.type="string",o.reflectToAttribute=!0}return o}updateTextNodes(){const e=this;e.updateTextNode(e.ownerElement.shadowRoot||e.ownerElement,e.ownerElement.bindings,e.ownerElement)}updateTextNode(e,t,n){const o=this;if(!t)return;let i=0;for(let r=e.firstChild;r&&t.children;r=r.nextSibling)o.updateTextNode(r,t.children[i++],n);if(t&&t.data)for(let e in t.data){const o=t.data[e],i=o.name;"textContent"===e&&o.twoWay&&!o.updating&&void 0!==o.value&&(n[i]=o.value)}}updateBoundProperty(e,t){if(t.updating)return;const n=this.ownerElement;t.updating=!0,n[e]=t.value,t.updating=!1}updateBoundNodes(e){const t=this;if(t.updateBoundNode(t.ownerElement.shadowRoot||t.ownerElement,t.ownerElement.bindings,t.ownerElement,e),t.ownerElement.detachedChildren.length>0)for(let n=0;n<t.ownerElement.detachedChildren.length;n++){const o=t.ownerElement.detachedChildren[n],i=o.getAttribute("smart-id"),r=function(e){if(e.nodeId===i)return e;for(let t in e.children){const n=e.children[t];if((n.getAttribute?n.getAttribute("smart-id"):"")===i)return e;if(n.children){const e=r(n);if(e)return e}}return null},a=r(t.ownerElement.bindings);if(a)t.updateBoundNode(o,a,t.ownerElement,e,!0);else if(o.getAttribute&&t.ownerElement.bindings.mapping){const n=t.ownerElement,o=t.ownerElement.bindings;if(o)for(let i in o.mapping){const r=n.querySelector('[smart-id="'+i+'"]');if(r){const a=o.mapping[i];t.updateBoundData(r,a,n,e)}}}}}updateBoundMappedNodes(){const e=this,t=e.ownerElement.bindings,n=e.ownerElement;if(t.mapping)for(let o in t.mapping){let i=n.querySelector('[smart-id="'+o+'"]');if(n.shadowRoot&&(i=n.querySelector('[id="'+o+'"]'),i||(i=n.shadowRoot.querySelector('[id="'+o+'"]')||n.shadowRoot.querySelector('[smart-id="'+o+'"]'))),i){const r=t.mapping[o];e.updateBoundData(i,r,n)}else if(n.getAttribute("aria-controls")){let r=document.getElementById(n.getAttribute("aria-controls"));if(!r&&n.shadowRoot&&(r=n.shadowRoot.getElementById(n.getAttribute("aria-controls"))),i=r.querySelector('[smart-id="'+o+'"]'),i){const r=t.mapping[o];e.updateBoundData(i,r,n)}}}}updateBoundNode(e,t,n,o,i){const r=this;if(!t)return;let a=0;if(i){if(i&&!t.data)for(let d=e.firstChild;d&&t.children;d=d.nextSibling)if(d.getAttribute){const e=d.getAttribute("smart-id"),i=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();r.updateBoundNode(d,i,n,o),a++}else r.updateBoundNode(d,t.children[a++],n,o,i)}else for(let i=e.firstChild;i&&t.children;i=i.nextSibling)if(i.getAttribute){const e=i.getAttribute("smart-id"),d=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();r.updateBoundNode(i,d,n,o),a++}else r.updateBoundNode(i,t.children[a++],n,o);if(!t||!t.data)return;const d=t.data;r.updateBoundData(e,d,n,o)}updateBoundData(e,n,o,i){const r=this;for(let a in n){const d=n[a];let l=d.name;if(!d.updating&&(l.indexOf("::")>=0&&(l=l.substring(0,l.indexOf("::"))),void 0===i||i===l)){if(l.indexOf("(")>=0){let e=l.substring(l.indexOf("("));const t=l.substring(0,l.indexOf("("));if(e=e.substring(1,e.length-1),e=e.replace(/ /gi,""),e=e.split(","),e.length>0&&""!==e[0]){let n=[];for(let t=0;t<e.length;t++)n.push(o[e[t]]);d.value=o[t].apply(o,n)}else d.value=o[t]();d.type=typeof d.value}else d.value=o[l];if("innerHTML"===l?e[a].toString().trim()!==o[l].toString().trim()&&(d.ready||o._properties[l].defaultValue!==d.value)&&(e[a]=d.value.toString().trim()):d.not?(e[a]=!d.value,d.targetPropertyName&&(e[d.targetPropertyName]=!d.value)):(e[a]=d.value,d.targetPropertyName&&(e[d.targetPropertyName]=d.value)),e.$&&e.$.isNativeElement){t.cache["toDash"+a]||(t.cache["toDash"+a]=window.Smart.Utilities.Core.toDash(a));const n=t.cache["toDash"+a],o=e.$.getAttributeValue(n,d.type);!d.reflectToAttribute||o===d.value&&d.ready||e.$.setAttributeValue(n,d.value,d.type),d.reflectToAttribute||e.$.setAttributeValue(n,null,d.type)}if(!d.ready){if(e.$&&e.$.isCustomElement){t.cache["toDash"+a]||(t.cache["toDash"+a]=window.Smart.Utilities.Core.toDash(a));const n=t.cache["toDash"+a];e._properties||(e._beforeCreatedProperties=e._properties=e.propertyByAttributeName=[]),e._properties[a]||(e._properties[a]={attributeName:n},e._beforeCreatedProperties&&(e._beforeCreatedProperties[a]=e._properties[a]),e.propertyByAttributeName[n]=e._properties[a]);const o=e._properties[a];o.isUpdating=!0,d.reflectToAttribute&&(d.not?e.$.setAttributeValue(o.attributeName,!d.value,d.type):e.$.setAttributeValue(o.attributeName,d.value,d.type)),d.reflectToAttribute||e.$.setAttributeValue(o.attributeName,null,d.type),o.isUpdating=!1}if(d.twoWay){const n=function(n){if(d.value=n,e.$&&e.$.isNativeElement){t.cache["toDash"+a]||(t.cache["toDash"+a]=window.Smart.Utilities.Core.toDash(a));const n=t.cache["toDash"+a],o=e.$.getAttributeValue(n,d.type);d.reflectToAttribute&&o!==d.value&&e.$.setAttributeValue(n,d.value,d.type),d.reflectToAttribute||e.$.setAttributeValue(n,null,d.type)}};if(d.name.indexOf("::")>=0){const t=d.name.indexOf("::"),o=d.name.substring(t+2);r.ownerElement["$"+e.getAttribute("smart-id")].listen(o,(function(){n(e[a]);const t=d.name.substring(0,d.name.indexOf("::"));r.updateBoundProperty(t,d)}))}if(e.$&&e.$.isCustomElement){e._properties[a]&&(e._properties[a].notify=!0),t.cache["toDash"+a]||(t.cache["toDash"+a]=window.Smart.Utilities.Core.toDash(a));const o=t.cache["toDash"+a];r.ownerElement["$"+e.getAttribute("smart-id")].listen(o+"-changed",(function(e){let t=e.detail;n(t.value);const o=r.ownerElement.context;e.context!==document&&(r.ownerElement.context=r.ownerElement),r.updateBoundProperty(d.name,d),r.ownerElement.context=o}))}}}d.ready=!0}}}static clearCache(){this.cache={}}}t.cache={};class n{constructor(e){const t=this;t._id=e.id,e.id?t._appRoot=document.getElementById(t._id):t._id=window.Smart.Utilities.Core.createGUID(),e.selector&&(t._id=window.Smart.Utilities.Core.createGUID(),t._appRoot=document.querySelector(e.selector)),t._appRoot||(t._appRoot=document.body),t._appRoot.classList.add("smart-visibility-hidden");const n={};if(e.render){const t=e.render(),o=e.components;(function(){const i=document.createDocumentFragment(),r=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),a=document.createElementNS("http://www.w3.org/1999/xhtml","body"),d=document.createElement("div");r.documentElement.appendChild(a),a.appendChild(d),d.innerHTML=t;for(let e=0;e<o.length;e++){const t=o[e],i=t.name,a=window.Smart.Utilities.Core.toDash(i),l=r.querySelectorAll(i);t.tagName=a;for(let e=0;e<l.length;e++){const t=l[e],o=t.getAttribute("id")||window.Smart.Utilities.Core.createGUID(),r=document.createElement("div");r.id=o,d.insertBefore(r,t),n["#"+o]={name:i,properties:[],rendered:!1},t.parentNode.removeChild(t)}}i.appendChild(d);const l=document.querySelector(e.selector);l&&l.appendChild(i)})()}t._template=e.template||{},t._data=e.data||{},t._components=n;const o=function(){t._addAttributeBindings(),t._renderForBindings(),t._addModelBindings(),t._observeData(),t.render(),t._appRoot.classList.remove("smart-visibility-hidden")};"complete"===document.readyState?o():window.addEventListener("load",o)}_addAttributeBindings(e,n){const o=this,i=new t,r=e?i.getBindings(e):i.getBindings(o._appRoot);n||(n="");const a=function(e){const t=function(e){if(e.data){let t=e.node.id;t||(e.node.id=t="id"+Math.floor(65536*(1+Math.random())).toString(16).substring(1));for(let i in e.data){const r=e.data[i];if("textContent"===i&&(e.node.parentNode.id?t=e.node.parentNode.id:(e.node.id="",e.node.parentNode.id=t)),r.isEvent){const e={};e[r.name]=r.value,o._addListenerBinding(t,e)}else{const e={};e[i]=n+r.name,o._addTemplateBinding(t,e)}}}};t(e);for(let n in e.children){const o=e.children[n];o.node&&o.node.getAttribute&&o.node.getAttribute("smart-for")&&null===o.node.getAttribute("smart-for-rendered")||(t(o),o.children&&a(o))}};a(r)}get template(){return this._template}set template(e){this._template=e,this.render()}get id(){return this._id}set id(e){this._id=e}get jsonData(){return this.toJSON()}get formData(){const e=new FormData,t=this.toJSON();if(!t)return e;const n=function(t,o){for(let i in t){const r=t[i];window.Smart.Utilities.Types.isFunction(r)||("object"!=typeof r||Array.isArray(r)||n(r,i),("object"!=typeof r||Array.isArray(r))&&(""===o?e.append(i,r):e.append(o+"."+i,r)))}};return n(t,""),e}toJSON(){const e=function(t,n){for(let o in t){if(o.startsWith("_")||"notifyFn"===o||"canNotify"===o||"name"===o)continue;if("propertyName"===o||"toString"===o||"propertyIsEnumerable"===o||"valueOf"===o||"toLocaleString"===o)continue;if("hasOwnProperty"===o||"isPrototypeOf"===o)continue;const i=t[o];if("observableArray"!==i.name)if("observable"!==i.name)if("object"!=typeof i||window.Smart.Utilities.Types.isFunction(i))n[o]=i;else{const t=e(i,{},o);n[o]=t}else{const t={};for(let n in i)if(!n.startsWith("_")&&"propertyIsEnumerable"!==n&&"notifyFn"!==n&&"canNotify"!==n&&"name"!==n&&!n.startsWith("_")&&"notifyFn"!==n&&"canNotify"!==n&&"name"!==n&&"propertyName"!==n&&"toString"!==n&&"valueOf"!==n&&"toLocaleString"!==n&&"hasOwnProperty"!==n&&"isPrototypeOf"!==n)if("object"!=typeof i||"object"!=typeof i[n]||window.Smart.Utilities.Types.isFunction(i))t[n]=i[n];else{const r=e(i[n],{},o+"."+n);t[n]=r}n[o]=t}else n[o]=i.toArray()}return n};return e(this._data,{},"")}get data(){const e=this;return e._data||(e._data={}),e._data}set data(e){const t=this;t._data=e,t._observeData(),t.render()}_addTemplateBinding(e,t){const n=this;n.template["#"+e]?n.template["#"+e].bind?Object.assign(n.template["#"+e].bind,t):n.template["#"+e].bind=t:n.template["#"+e]={bind:t}}_addListenerBinding(e,t){const n=this;n.template["#"+e]?n.template["#"+e].listeners?Object.assign(n.template["#"+e].listeners,t):n.template["#"+e].listeners=t:n.template["#"+e]={listeners:t}}_updateDataFromBooleanElement(e,t){const n=this,o=t.checked,i=n._data[o];if(e.value&&"on"!==e.value)if(Array.isArray(i)||"observableArray"===i.name)if(e.checked)i.push(e.value);else{const t=i.indexOf(e.value);t>=0&&i.splice(t,1)}else"radio"!==e.type?e.checked?n._data[o]=e.value:n._data[o]="":e.checked&&(n._data[o]=e.value);else n._data[o]=e.checked}_updateDataFromNativeElement(e,t){const n=this;if("SELECT"===e.tagName&&e.addEventListener("change",(function(){const o=t.value;let i=n._data[o];if(e.__updating=!0,Array.isArray(i)||"observableArray"===i.name){if(i=new window.Smart.ObservableArray,e.selectedOptions)for(let t=0;t<e.selectedOptions.length;t++){const n=e.selectedOptions[t];i.push(n.value)}n._data[o]=i}else n._data[o]=e.value;e.__updating=!1})),"INPUT"===e.tagName||"TEXTAREA"===e.tagName){e.addEventListener("change",(function(){e.__updating=!0,o?n._updateDataFromBooleanElement(e,t):n._data.value=e.value,e.__updating=!1}));let o="checkbox"===e.type||"radio"===e.type;o||e.addEventListener("keyup",(function(){const o=t.value;n._data[o]=e.value}))}}_addModelBindings(e){const t=this,n=e?e.querySelectorAll("[smart-model]"):t._appRoot.querySelectorAll("[smart-model]");for(let e=0;e<n.length;e++){const o=n[e];let i={value:o.getAttribute("smart-model")};"list"===o.type&&(i={selectedValues:o.getAttribute("smart-model")}),"checkbox"!==o.type&&"radio"!==o.type||(i={checked:o.getAttribute("smart-model")}),o.id||(o.id="id"+window.Smart.Utilities.Core.createGUID().replace(/-/gi,"")),t._updateDataFromNativeElement(o,i),t._addTemplateBinding(o.id,i)}}_renderForBindings(e){const t=this,n=t._appRoot.querySelectorAll("[smart-for]");for(let e=0;e<n.length;e++){const o=n[e],i=o.getAttribute("smart-for"),r=t._data[i];o.id||(o.id="id"+window.Smart.Utilities.Core.createGUID().replace(/-/gi,"")),o.setAttribute("smart-for-rendered","");const a=null!==o.getAttribute("smart-for-self"),d=a?o.parentNode.querySelectorAll(".smart-for-item-"+o.id):o.querySelectorAll(".smart-for-item-"+o.id);for(let e=0;e<d.length;e++)t.template[d[e].id]&&delete t.template[d[e].id],d[e].remove();const l=a?o:o.firstElementChild,s=document.createDocumentFragment();for(let e=0;e<r.length;e++){const t=l.cloneNode(!0);t.style.display="",t.id=o.id+"_"+e,t.classList.add("smart-for-item"),t.classList.add("smart-for-item-"+o.id),t.removeAttribute("smart-for"),s.appendChild(t)}l.style.display="none",a?o.parentNode.insertBefore(s,o.nextSibling):o.appendChild(s);let c=t._appRoot.querySelectorAll(".smart-for-item-"+o.id);for(let e=0;e<c.length;e++){const n=c[e];t._addAttributeBindings(n,i+"."+e+".")}}e&&n.length>0&&t.render()}notify(e){const t=this;t.notifyFn=function(n){n.owner=t,e(n)}}_notify(e){const t=this;if("length"===e.propertyName)return;t.notifyFn&&t.notifyFn(e);let n=e.propertyName;e.object&&(n=e.object.propertyName);for(let e in t.template){const o=t.template[e];let i=null;for(let e in o.bind)if("function"!=typeof o.bind[e]&&o.bind[e].indexOf(n)>=0){i=e;break}i&&t._setPropertyFromData(o,i)}t._renderForBindings(!0)}_observeData(){const e=this;e._data=new window.Smart.Observable(e._data),e._data.canNotify=!1,e._data.notify(e._notify.bind(e));const t=function(n){n.canNotify=!1;for(let o in n){if("function"==typeof n[o]){n[o]=n[o].bind(n);continue}if(o.startsWith("_")||"notifyFn"===o||"canNotify"===o||"name"===o)continue;const i=n[o];Array.isArray(i)?(n[o]=new window.Smart.ObservableArray(n[o]),n[o].canNotify=!1,n[o].notify(e._notify.bind(e)),n[o].canNotify=!0,n[o].propertyName=o):i&&"object"==typeof i&&i.constructor===window.Smart.DataAdapter||i&&"object"==typeof i&&i instanceof Date?n[o].propertyName=o:i&&"object"==typeof i&&(n[o]=new window.Smart.Observable(n[o]),n[o].canNotify=!1,n[o].notify(e._notify.bind(e)),n[o].canNotify=!0,n[o].propertyName=o,t(n[o]))}n.canNotify=!0};for(let n in e._data){if("function"==typeof e._data[n]){e._data[n]=e._data[n].bind(e._data);continue}if(n.startsWith("_")||"notifyFn"===n||"canNotify"===n||"name"===n)continue;const o=e._data[n];Array.isArray(o)?(e._data[n]=new window.Smart.ObservableArray(e._data[n]),e._data[n].canNotify=!1,e._data[n].notify(e._notify.bind(e)),e._data[n].canNotify=!0,e._data[n].propertyName=n):"object"==typeof o&&o.constructor===window.Smart.DataAdapter||"object"==typeof o&&o instanceof Date?e._data[n].propertyName=n:"object"==typeof o&&(e._data[n]=new window.Smart.Observable(e._data[n]),e._data[n].canNotify=!1,e._data[n].notify(e._notify.bind(e)),e._data[n].canNotify=!0,e._data[n].propertyName=n,t(e._data[n]))}e._data.canNotify=!0}_setPropertyFromData(e,t){const n=this;if(e.element.__updating||!e.bind)return;const o=e.bind[t];if("function"==typeof o)return;const i=o?o.split("."):[];let r=n._data;for(let e=0;e<i.length;e++){const t=i[e];if("string"==typeof r)break;if(void 0===r[t]){r=void 0;break}r=r[t]}if(e.bind.computed){const t={item:e,name:o,value:r};e.bind.computed(t),t.value!==r&&(r=t.value)}if(e.element.__updatingProperties=!0,o&&void 0!==r){if("observableArray"===r.name)"checkbox"===e.element.type?e.element[t]=r.indexOf(e.element.value)>=0:e.element[t]=r.toArray().slice(0);else if("observable"===r.name){const n=function(e){let t=null;for(let i in e){if("function"==typeof e[i])continue;if(i.startsWith("_")||"notifyFn"===i||"canNotify"===i||"name"===i)continue;const r=e[i];if(void 0!==r&&!(r&&Array.isArray(r)||r&&"object"==typeof r&&r.constructor===window.Smart.DataAdapter)){if(r&&"object"==typeof r&&(t=n(e[i])),i===o){t=r;break}if(t)return t}}return t},i=n(r);e.element[t]=i||r}else"radio"===e.element.type?e.element.value===r?e.element[t]=!0:e.element[t]=!1:e.element[t]=r;n._components[e.selector]&&!n._components[e.selector].rendered&&(n._components[e.selector].properties[t]=r)}else e.properties&&(e.element[t]=e.properties[t],n._components[e.selector]&&!n._components[e.selector].rendered&&(n._components[e.selector].properties[t]=e.properties[t]));e.element.__updatingProperties=!1}render(){const e=this;for(let t in e.template){const n=e.template[t],o=n.element?n.element:document.querySelector(t),i=n.properties,r=n.listeners,a=n.bind;if(!o)continue;n.selector=t,n.element=o,o._properties||(o._properties=[]);for(let t in i){const i=o._properties?o._properties[t]:null;i&&(i.notify=!0),e._setPropertyFromData(n,t)}for(let t in a){const i=o._properties?o._properties[t]:null;i&&(i.notify=!0),e._setPropertyFromData(n,t)}if(e._components&&e._components[t]&&!1===e._components[t].rendered){const o=e._components[t];n.element=o.instance=new window[o.name](t,o.properties),o.rendered=!0}const d=function(t){const o=n.element;for(let n in r)o.$||(o.$=window.Smart.Utilities.Extend(o)),o.$[t](n,(function(t){const o=r[n];if(o.indexOf(".")>=0){const n=o.split(".");let i=e._data[n[0]];for(let e=1;e<n.length;e++)i=i[n[e]];void 0!==i&&i(t)}else e._data[o]&&e._data[o](t)}));for(let n in a){const i=o._properties?o._properties[n]:null;if(i){const r=function(t){if(o.__updatingProperties)return;o.__updating=!0;const i=function(e){if("radio"===o.type){const t=o.parentNode.querySelectorAll('[type="radio"]');for(let n=0;n<t.length;n++)t[n].__updating=e}};i(!0);const r=a[n];if("radio"===o.type||"toggle"===o.type||"checkbox"===o.type)e._updateDataFromBooleanElement(o,a);else{(function(e,t,n){var o;for(o=0;o<t.length-1;o++)e=e[t[o]];e[t[o]]=n})(e._data,r.split("."),t.detail.value)}o.__updating=!1,i(!1)};"textarea"===o.type&&o.$[t]("input.keyup",(function(e){const t=new CustomEvent("keyup",{detail:{originalEvent:e,value:o.$.input.value}});r(t)})),o.$[t](i.attributeName+"-changed",(function(e){r(e)}))}}};d("unlisten"),o.isAttached&&d("listen"),o.onAttached=function(){d("listen")},o.onDetached=function(){d("unlisten")}}}}window.Smart.App=n,window[e.toLowerCase()+"App"]=n,window.App=n})();
/***/ }),
/***/ 6321:
/***/ (() => {
!function(){if(void 0===typeof window)return;const e="21.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,i=n,s=r)}));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 C;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()),C||(C=Date.now()),Math.abs(Date.now()-C)>375?l=Date.now():o=!0,C=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()-C,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,r){const o=this;r||(r={bubbles:!0,cancelable:!0,composed:null!==o.element.getRootNode().host}),r.detail=t||{};const i=new CustomEvent(e,r);if(i.originalStopPropagation=i.stopPropagation,i.stopPropagation=function(){return i.isPropagationStopped=!0,i.originalStopPropagation()},o.dispatchEvent(i),window[n].isVue){const t=y.Core.toDash(e);if(t!==e){const e=new CustomEvent(t,r);e.originalStopPropagation=i.stopPropagation,e.stopPropagation=function(){return e.isPropagationStopped=!0,e.originalStopPropagation()},o.dispatchEvent(e)}}return i}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.boundE