window.JSCompiler_renameProperty=function(t,e){return t};let t=0,e=0,n=[],r=0,s=!1,i=document.createTextNode("");new window.MutationObserver((function(){s=!1;const t=n.length;for(let e=0;e<t;e++){let t=n[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}n.splice(0,t),e+=t})).observe(i,{characterData:!0});const o={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},a={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},l={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},h={run:e=>(s||(s=!0,i.textContent=r++),n.push(e),t++),cancel(t){const r=t-e;if(r>=0){if(!n[r])throw new Error("invalid async handle: "+t);n[r]=null}}};let c=0;const d=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let n=c++;return function(r){let s=r.__mixinSet;if(s&&s[n])return r;let i=e,o=i.get(r);if(!o){o=t(r),i.set(r,o);let e=Object.create(o.__mixinSet||s||null);e[n]=!0,o.__mixinSet=e}return o}};class _{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,u.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),u.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,n){return t instanceof _?t._cancelAsync():t=new _,t.setConfig(e,n),t}}let u=new Set;const p=function(t){u.add(t)},f=function(){const t=Boolean(u.size);return u.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};let m,y,g=/(url\()([^)]*)(\))/g,b=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function P(t,e){if(t&&b.test(t))return t;if("//"===t)return t;if(void 0===m){m=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",m="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),m)try{return new URL(t,e).href}catch(e){return t}return y||(y=document.implementation.createHTMLDocument("temp"),y.base=y.createElement("base"),y.head.appendChild(y.base),y.anchor=y.createElement("a"),y.body.appendChild(y.anchor)),y.base.href=e,y.anchor.href=t,y.anchor.href||t}function v(t,e){return t.replace(g,(function(t,n,r,s){return n+"'"+P(r.replace(/["']/g,""),e)+"'"+s}))}function C(t){return t.substring(0,t.lastIndexOf("/")+1)}const w=!0;Boolean(!0),"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let E=window.Polymer&&window.Polymer.rootPath||C(document.baseURI||window.location.href),T=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,O=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,A=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,N=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,x=(window.Polymer,!1),S=window.Polymer&&window.Polymer.orderedComputed||!1;const I=t=>t;let k="string"==typeof document.head.style.touchAction,L="__polymerGestures",M="__polymerGesturesHandled",D="__polymerGesturesTouchAction",R=["mousedown","mousemove","mouseup","click"],F=[0,1,4,2],H=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function z(t){return R.indexOf(t)>-1}let j=!1;function B(t){if(!z(t)&&"touchend"!==t)return k&&j&&O?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){j=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let J=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const q=[],Y={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},$={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function U(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];try{let n=t.getRootNode();if(t.id){let r=n.querySelectorAll(`label[for = '${t.id}']`);for(let t=0;t<r.length;t++)e.push(r[t])}}catch(t){}}return e}let V=function(t){let e=t.sourceCapabilities;var n;if((!e||e.firesTouchEvents)&&(t[M]={skip:!0},"click"===t.type)){let e=!1,r=Q(t);for(let t=0;t<r.length;t++){if(r[t].nodeType===Node.ELEMENT_NODE)if("label"===r[t].localName)q.push(r[t]);else if(n=r[t],Y[n.localName]){let n=U(r[t]);for(let t=0;t<n.length;t++)e=e||q.indexOf(n[t])>-1}if(r[t]===W.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function X(t){let e=J?["click"]:R;for(let n,r=0;r<e.length;r++)n=e[r],t?(q.length=0,document.addEventListener(n,V,!0)):document.removeEventListener(n,V,!0)}function G(t){let e=t.type;if(!z(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!H&&(e=F[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let W={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Z(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function K(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}document.addEventListener("touchend",(function(t){W.mouse.mouseIgnoreJob||X(!0),W.mouse.target=Q(t)[0],W.mouse.mouseIgnoreJob=_.debounce(W.mouse.mouseIgnoreJob,o.after(2500),(function(){X(),W.mouse.target=null,W.mouse.mouseIgnoreJob=null}))}),!!j&&{passive:!0});const Q=t=>t.composedPath&&t.composedPath()||[],tt={},et=[];function nt(t,e){let n=document.elementFromPoint(t,e),r=n;for(;r&&r.shadowRoot;){let s=r;if(r=r.shadowRoot.elementFromPoint(t,e),s===r)break;r&&(n=r)}return n}function rt(t){const e=Q(t);return e.length>0?e[0]:t.target}function st(t){let e,n=t.type,r=t.currentTarget[L];if(!r)return;let s=r[n];if(s){if(!t[M]&&(t[M]={},"touch"===n.slice(0,5))){let e=t.changedTouches[0];if("touchstart"===n&&1===t.touches.length&&(W.touch.id=e.identifier),W.touch.id!==e.identifier)return;k||"touchstart"!==n&&"touchmove"!==n||function(t){let e=t.changedTouches[0],n=t.type;if("touchstart"===n)W.touch.x=e.clientX,W.touch.y=e.clientY,W.touch.scrollDecided=!1;else if("touchmove"===n){if(W.touch.scrollDecided)return;W.touch.scrollDecided=!0;let n=function(t){let e="auto",n=Q(t);for(let t,r=0;r<n.length;r++)if(t=n[r],t[D]){e=t[D];break}return e}(t),r=!1,s=Math.abs(W.touch.x-e.clientX),i=Math.abs(W.touch.y-e.clientY);t.cancelable&&("none"===n?r=!0:"pan-x"===n?r=i>s:"pan-y"===n&&(r=s>i)),r?t.preventDefault():ct("track")}}(t)}if(e=t[M],!e.skip){for(let n,r=0;r<et.length;r++)n=et[r],s[n.name]&&!e[n.name]&&n.flow&&n.flow.start.indexOf(t.type)>-1&&n.reset&&n.reset();for(let r,i=0;i<et.length;i++)r=et[i],s[r.name]&&!e[r.name]&&(e[r.name]=!0,r[n](t))}}}function it(t,e,n){return!!tt[e]&&(function(t,e,n){let r=tt[e],s=r.deps,i=r.name,o=t[L];o||(t[L]=o={});for(let e,n,r=0;r<s.length;r++)e=s[r],J&&z(e)&&"click"!==e||(n=o[e],n||(o[e]=n={_count:0}),0===n._count&&t.addEventListener(e,st,B(e)),n[i]=(n[i]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),r.touchAction&<(t,r.touchAction)}(t,e,n),!0)}function ot(t,e,n){return!!tt[e]&&(function(t,e,n){let r=tt[e],s=r.deps,i=r.name,o=t[L];if(o)for(let e,n,r=0;r<s.length;r++)e=s[r],n=o[e],n&&n[i]&&(n[i]=(n[i]||1)-1,n._count=(n._count||1)-1,0===n._count&&t.removeEventListener(e,st,B(e)));t.removeEventListener(e,n)}(t,e,n),!0)}function at(t){et.push(t);for(let e=0;e<t.emits.length;e++)tt[t.emits[e]]=t}function lt(t,e){k&&t instanceof HTMLElement&&h.run((()=>{t.style.touchAction=e})),t[D]=e}function ht(t,e,n){let r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,I(t).dispatchEvent(r),r.defaultPrevented){let t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function ct(t){let e=function(t){for(let e,n=0;n<et.length;n++){e=et[n];for(let n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function dt(t,e,n,r){e&&ht(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(t){return ct(t)}})}function _t(t,e,n){if(t.prevent)return!1;if(t.started)return!0;let r=Math.abs(t.x-e),s=Math.abs(t.y-n);return r>=5||s>=5}function ut(t,e,n){if(!e)return;let r,s=t.moves[t.moves.length-2],i=t.moves[t.moves.length-1],o=i.x-t.x,a=i.y-t.y,l=0;s&&(r=i.x-s.x,l=i.y-s.y),ht(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:o,dy:a,ddx:r,ddy:l,sourceEvent:n,hover:function(){return nt(n.clientX,n.clientY)}})}function pt(t,e,n){let r=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),i=rt(n||e);!i||$[i.localName]&&i.hasAttribute("disabled")||(isNaN(r)||isNaN(s)||r<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=rt(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let n=e.getBoundingClientRect(),r=t.pageX,s=t.pageY;return!(r>=n.left&&r<=n.right&&s>=n.top&&s<=n.bottom)}return!1}(e))&&(t.prevent||ht(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}at({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){K(this.info)},mousedown:function(t){if(!G(t))return;let e=rt(t),n=this;Z(this.info,(function(t){G(t)||(dt("up",e,t),K(n.info))}),(function(t){G(t)&&dt("up",e,t),K(n.info)})),dt("down",e,t)},touchstart:function(t){dt("down",rt(t),t.changedTouches[0],t)},touchend:function(t){dt("up",rt(t),t.changedTouches[0],t)}}),at({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,K(this.info)},mousedown:function(t){if(!G(t))return;let e=rt(t),n=this,r=function(t){let r=t.clientX,s=t.clientY;_t(n.info,r,s)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&ct("tap"),n.info.addMove({x:r,y:s}),G(t)||(n.info.state="end",K(n.info)),e&&ut(n.info,e,t),n.info.started=!0)};Z(this.info,r,(function(t){n.info.started&&r(t),K(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=rt(t),n=t.changedTouches[0],r=n.clientX,s=n.clientY;_t(this.info,r,s)&&("start"===this.info.state&&ct("tap"),this.info.addMove({x:r,y:s}),ut(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=rt(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),ut(this.info,e,n))}}),at({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){G(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){G(t)&&pt(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){pt(this.info,t.changedTouches[0],t)}});const ft=rt,mt=it,yt=ot;var gt=Object.freeze({__proto__:null,add:mt,addListener:it,deepTargetFind:nt,findOriginalTarget:ft,gestures:tt,prevent:ct,recognizers:et,register:at,remove:yt,removeListener:ot,resetMouseCanceller:function(){W.mouse.mouseIgnoreJob&&W.mouse.mouseIgnoreJob.flush()},setTouchAction:lt});let bt={},Pt={};function vt(t,e){bt[t]=Pt[t.toLowerCase()]=e}function Ct(t){return bt[t]||Pt[t.toLowerCase()]}class wt extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let n=Ct(t);return n&&e?n.querySelector(e):n}return null}attributeChangedCallback(t,e,n,r){e!==n&&this.register()}get assetpath(){if(!this.__assetpath){const t=this.ownerDocument,e=P(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=C(e)}return this.__assetpath}register(t){if(t=t||this.id){if(A&&void 0!==Ct(t))throw vt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,vt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}wt.prototype.modules=bt,customElements.define("dom-module",wt);const Et="link[rel=import][type~=css]",Tt="include",Ot="shady-unscoped";function At(t){return wt.import(t)}function Nt(t){const e=v((t.body?t.body:t).textContent,t.baseURI),n=document.createElement("style");return n.textContent=e,n}function xt(t){const e=t.trim().split(/\s+/),n=[];for(let t=0;t<e.length;t++)n.push(...St(e[t]));return n}function St(t){const e=At(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...kt(e));const n=e.querySelector("template");n&&t.push(...It(n,e.assetpath)),e._styles=t}return e._styles}function It(t,e){if(!t._styles){const n=[],r=t.content.querySelectorAll("style");for(let t=0;t<r.length;t++){let s=r[t],i=s.getAttribute(Tt);i&&n.push(...xt(i).filter((function(t,e,n){return n.indexOf(t)===e}))),e&&(s.textContent=v(s.textContent,e)),n.push(s)}t._styles=n}return t._styles}function kt(t){const e=[],n=t.querySelectorAll(Et);for(let t=0;t<n.length;t++){let r=n[t];if(r.import){const t=r.import,n=r.hasAttribute(Ot);if(n&&!t._unscopedStyle){const e=Nt(t);e.setAttribute(Ot,""),t._unscopedStyle=e}else t._style||(t._style=Nt(t));e.push(n?t._unscopedStyle:t._style)}}return e}function Lt(t){let e=At(t);if(e&&void 0===e._cssText){let t=function(t){let e="",n=kt(t);for(let t=0;t<n.length;t++)e+=n[t].textContent;return e}(e),n=e.querySelector("template");n&&(t+=function(t,e){let n="";const r=It(t,e);for(let t=0;t<r.length;t++){let e=r[t];e.parentNode&&e.parentNode.removeChild(e),n+=e.textContent}return n}(n,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}function Mt(t){return t.indexOf(".")>=0}function Dt(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Rt(t,e){return 0===t.indexOf(e+".")}function Ft(t,e){return 0===e.indexOf(t+".")}function Ht(t,e,n){return e+n.slice(t.length)}function zt(t,e){return t===e||Rt(t,e)||Ft(t,e)}function jt(t){if(Array.isArray(t)){let e=[];for(let n=0;n<t.length;n++){let r=t[n].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function Bt(t){return Array.isArray(t)?jt(t).split("."):t.toString().split(".")}function Jt(t,e,n){let r=t,s=Bt(e);for(let t=0;t<s.length;t++){if(!r)return;r=r[s[t]]}return n&&(n.path=s.join(".")),r}function qt(t,e,n){let r=t,s=Bt(e),i=s[s.length-1];if(s.length>1){for(let t=0;t<s.length-1;t++){if(r=r[s[t]],!r)return}r[i]=n}else r[e]=n;return s.join(".")}const Yt={},$t=/-[a-z]/g,Ut=/([A-Z])/g;function Vt(t){return Yt[t]||(Yt[t]=t.indexOf("-")<0?t:t.replace($t,(t=>t[1].toUpperCase())))}function Xt(t){return Yt[t]||(Yt[t]=t.replace(Ut,"-$1").toLowerCase())}const Gt=h,Wt=d((t=>class extends t{static createProperties(t){const e=this.prototype;for(let n in t)n in e||e._createPropertyAccessor(n)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,n){let r=this.__data[t],s=this._shouldPropertyChange(t,e,r);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Gt.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(t,e,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,n)),this.__dataCounter--}_shouldPropertiesChange(t,e,n){return Boolean(e)}_propertiesChanged(t,e,n){}_shouldPropertyChange(t,e,n){return n!==e&&(n==n||e==e)}attributeChangedCallback(t,e,n,r){e!==n&&this._attributeToProperty(t,n),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,n,r)}_attributeToProperty(t,e,n){if(!this.__serializing){const r=this.__dataAttributes,s=r&&r[t]||t;this[s]=this._deserializeValue(e,n||this.constructor.typeForProperty(s))}}_propertyToAttribute(t,e,n){this.__serializing=!0,n=arguments.length<3?this[t]:n,this._valueToNodeAttribute(this,n,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,n){const r=this._serializeValue(e);"class"!==n&&"name"!==n&&"slot"!==n||(t=I(t)),void 0===r?t.removeAttribute(n):t.setAttribute(n,r)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Zt={};let Kt=HTMLElement.prototype;for(;Kt;){let t=Object.getOwnPropertyNames(Kt);for(let e=0;e<t.length;e++)Zt[t[e]]=!0;Kt=Object.getPrototypeOf(Kt)}const Qt=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1;const te=d((t=>{const e=Wt(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Vt(t[e]))}static attributeNameForProperty(t){return Xt(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){const n=this;n.hasAttribute(t)||this._valueToNodeAttribute(n,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Qt(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let n;switch(e){case Object:try{n=JSON.parse(t)}catch(e){n=t}break;case Array:try{n=JSON.parse(t)}catch(e){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:n=isNaN(t)?String(t):Number(t),n=new Date(n);break;default:n=super._deserializeValue(t,e)}return n}_definePropertyAccessor(t,e){!function(t,e){if(!Zt[e]){let n=t[e];void 0!==n&&(t.__data?t._setPendingProperty(e,n):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=n))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),ee={"dom-if":!0,"dom-repeat":!0};let ne=!1,re=!1;function se(t){(function(){if(!ne){ne=!0;const t=document.createElement("textarea");t.placeholder="a",re=t.placeholder===t.textContent}return re})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}const ie=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,n,r)=>{const s=n.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(s,r)):e.setAttribute(r,s)}})();function oe(t){let e=t.getAttribute("is");if(e&&ee[e]){let n=t;for(n.removeAttribute("is"),t=n.ownerDocument.createElement(e),n.parentNode.replaceChild(t,n),t.appendChild(n);n.attributes.length;){const{name:e}=n.attributes[0];ie(t,n,e),n.removeAttribute(e)}}return t}function ae(t,e){let n=e.parentInfo&&ae(t,e.parentInfo);if(!n)return t;for(let t=n.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function le(t,e,n,r){r.id&&(e[r.id]=n)}function he(t,e,n){if(n.events&&n.events.length)for(let r,s=0,i=n.events;s<i.length&&(r=i[s]);s++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function ce(t,e,n,r){n.templateInfo&&(e._templateInfo=n.templateInfo,e._parentTemplateInfo=r)}const de=d((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let n=t._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(e),n.stripWhiteSpace=!0,this._parseTemplateContent(t,n,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,n){return this._parseTemplateNode(t.content,e,n)}static _parseTemplateNode(t,e,n){let r=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(s,e,n)||r,se(s),s.firstChild&&this._parseTemplateChildNodes(s,e,n),s.hasAttributes&&s.hasAttributes()&&(r=this._parseTemplateNodeAttributes(s,e,n)||r),r||n.noted}static _parseTemplateChildNodes(t,e,n){if("script"!==t.localName&&"style"!==t.localName)for(let r,s=t.firstChild,i=0;s;s=r){if("template"==s.localName&&(s=oe(s)),r=s.nextSibling,s.nodeType===Node.TEXT_NODE){let n=r;for(;n&&n.nodeType===Node.TEXT_NODE;)s.textContent+=n.textContent,r=n.nextSibling,t.removeChild(n),n=r;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let o={parentIndex:i,parentInfo:n};this._parseTemplateNode(s,e,o)&&(o.infoIndex=e.nodeInfoList.push(o)-1),s.parentNode&&i++}}static _parseTemplateNestedTemplate(t,e,n){let r=t,s=this._parseTemplate(r,e);return(s.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),n.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,n){let r=!1,s=Array.from(t.attributes);for(let i,o=s.length-1;i=s[o];o--)r=this._parseTemplateNodeAttribute(t,e,n,i.name,i.value)||r;return r}static _parseTemplateNodeAttribute(t,e,n,r,s){return"on-"===r.slice(0,3)?(t.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:s}),!0):"id"===r&&(n.id=s,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let n=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,r=e.content||t.content,s=document.importNode(r,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let i=s.nodeList=new Array(n.length);s.$={};for(let t,r=0,o=n.length;r<o&&(t=n[r]);r++){let n=i[r]=ae(s,t);le(0,s.$,n,t),ce(0,n,t,e),he(this,n,t)}return s}_addMethodEventListenerToNode(t,e,n,r){let s=function(t,e,n){return t=t._methodHost||t,function(e){t[n]?t[n](e,e.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||t,0,n);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,n){t.addEventListener(e,n)}_removeEventListenerFromNode(t,e,n){t.removeEventListener(e,n)}}));let _e=0;const ue=[],pe={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},fe="__computeInfo",me=/[A-Z]/;function ye(t,e,n){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),n))for(let t in r){let e=r[t],n=r[t]=Array(e.length);for(let t=0;t<e.length;t++)n[t]=e[t]}}else r=t[e]={};return r}function ge(t,e,n,r,s,i){if(e){let o=!1;const a=_e++;for(let l in n){let h=e[s?Dt(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||s&&!Pe(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,n,r,e.info,s,i),o=!0)}return o}return!1}function be(t,e,n,r,s,i,o,a){let l=!1,h=e[o?Dt(r):r];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===n||o&&!Pe(r,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,r,s,i,e.info,o,a),l=!0);return l}function Pe(t,e){if(e){let n=e.name;return n==t||!(!e.structured||!Rt(n,t))||!(!e.wildcard||!Ft(n,t))}return!0}function ve(t,e,n,r,s){let i="string"==typeof s.method?t[s.method]:s.method,o=s.property;i?i.call(t,t.__data[o],r[o]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function Ce(t,e,n){let r=Dt(e);if(r!==e){return we(t,Xt(r)+"-changed",n[e],e),!0}return!1}function we(t,e,n,r){let s={value:n,queueProperty:!0};r&&(s.path=r),I(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function Ee(t,e,n,r,s,i){let o=(i?Dt(e):e)!=e?e:null,a=o?Jt(t,o):t.__data[e];o&&void 0===a&&(a=n[e]),we(t,s.eventName,a,o)}function Te(t,e,n,r,s){let i=t.__data[e];T&&(i=T(i,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,i)}function Oe(t,e,n,r){let s=t[pe.COMPUTE];if(s)if(S){_e++;const i=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const n=t[pe.COMPUTE];let r,{counts:s,ready:i,total:o}=function(t){const e=t[fe],n={},r=t[pe.COMPUTE],s=[];let i=0;for(let t in e){const r=e[t];i+=n[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||s.push(t);return{counts:n,ready:s,total:i}}(t);for(;r=i.shift();){e.set(r,e.size);const t=n[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--o,0==--s[e]&&i.push(e)}))}if(0!==o){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),o=[];for(let t in e)Ne(t,s,o,i,r);let a;for(;a=o.shift();)xe(t,"",e,n,a)&&Ne(a.methodInfo,s,o,i,r);Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let i=e;for(;ge(t,s,i,n,r);)Object.assign(n,t.__dataOld),Object.assign(e,t.__dataPending),i=t.__dataPending,t.__dataPending=null}}const Ae=(t,e,n)=>{let r=0,s=e.length-1,i=-1;for(;r<=s;){const o=r+s>>1,a=n.get(e[o].methodInfo)-n.get(t.methodInfo);if(a<0)r=o+1;else{if(!(a>0)){i=o;break}s=o-1}}i<0&&(i=s+1),e.splice(i,0,t)},Ne=(t,e,n,r,s)=>{const i=e[s?Dt(t):t];if(i)for(let e=0;e<i.length;e++){const o=i[e];o.info.lastRun===_e||s&&!Pe(t,o.trigger)||(o.info.lastRun=_e,Ae(o.info,n,r))}};function xe(t,e,n,r,s){let i=Re(t,e,n,r,s);if(i===ue)return!1;let o=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,i,!0):(t[o]=i,!1)}function Se(t,e,n,r,s,i,o){n.bindings=n.bindings||[];let a={kind:r,target:s,parts:i,literal:o,isCompound:1!==i.length};if(n.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Xt(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let n=0;n<a.parts.length;n++){let r=a.parts[n];r.compoundIndex=n,Ie(t,e,a,r,l)}}function Ie(t,e,n,r,s){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let i=r.dependencies,o={index:s,binding:n,part:r,evaluator:t};for(let n=0;n<i.length;n++){let r=i[n];"string"==typeof r&&(r=qe(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:ke,info:o,trigger:r})}}}function ke(t,e,n,r,s,i,o){let a=o[s.index],l=s.binding,h=s.part;if(i&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let r=n[e];e=Ht(h.source,l.target,e),a._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(a)}else{let o=s.evaluator._evaluateBinding(t,h,e,n,r,i);o!==ue&&function(t,e,n,r,s){s=function(t,e,n,r){if(n.isCompound){let s=t.__dataCompoundStorage[n.target];s[r.compoundIndex]=e,e=s.join("")}"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e));return e}(e,s,n,r),T&&(s=T(s,n.target,n.kind,e));if("attribute"==n.kind)t._valueToNodeAttribute(e,s,n.target);else{let r=n.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[pe.READ_ONLY]&&e[pe.READ_ONLY][r]||e._setPendingProperty(r,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,s)}}(t,a,l,h,o)}}function Le(t,e){if(e.isCompound){let n=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,s=new Array(r.length);for(let t=0;t<r.length;t++)s[t]=r[t].literal;let i=e.target;n[i]=s,e.literal&&"property"==e.kind&&("className"===i&&(t=I(t)),t[i]=e.literal)}}function Me(t,e,n){if(n.listenerEvent){let r=n.parts[0];t.addEventListener(n.listenerEvent,(function(t){!function(t,e,n,r,s){let i,o=t.detail,a=o&&o.path;a?(r=Ht(n,r,a),i=o&&o.value):i=t.currentTarget[n],i=s?!i:i,e[pe.READ_ONLY]&&e[pe.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,i,!0,Boolean(a))||o&&o.queueProperty||e._invalidateProperties()}(t,e,n.target,r.source,r.negate)}))}}function De(t,e,n,r,s,i){i=e.static||i&&("object"!=typeof i||i[e.methodName]);let o={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:i};for(let s,i=0;i<e.args.length&&(s=e.args[i]);i++)s.literal||t._addPropertyEffect(s.rootProperty,n,{fn:r,info:o,trigger:s});return i&&t._addPropertyEffect(e.methodName,n,{fn:r,info:o}),o}function Re(t,e,n,r,s){let i=t._methodHost||t,o=i[s.methodName];if(o){let r=t._marshalArgs(s.args,e,n);return r===ue?ue:o.apply(i,r)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const Fe=[],He="(?:[a-zA-Z_$][\\w.:$\\-*]*)",ze="(?:("+He+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",je=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?"+("("+He+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+ze+"(?:,\\s*"+ze+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function Be(t){let e="";for(let n=0;n<t.length;n++){e+=t[n].literal||""}return e}function Je(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Fe};if(e[2].trim()){return function(t,e){return e.args=t.map((function(t){let n=qe(t);return n.literal||(e.static=!1),n}),this),e}(e[2].replace(/\\,/g,",").split(","),t)}return t}return null}function qe(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),n={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.rootProperty=Dt(e),n.structured=Mt(e),n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n}function Ye(t,e,n){let r=Jt(t,n);return void 0===r&&(r=e[n]),r}function $e(t,e,n,r){const s={indexSplices:r};t.notifyPath(n+".splices",s),t.notifyPath(n+".length",e.length)}function Ue(t,e,n,r,s,i){$e(t,e,n,[{index:r,addedCount:s,removed:i,object:e,type:"splice"}])}const Ve=d((t=>{const e=de(te(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return pe}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Xe.length){let t=Xe[Xe.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[pe.READ_ONLY];for(let n in t)e&&e[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=t[n])}_addPropertyEffect(t,e,n){this._createPropertyAccessor(t,e==pe.READ_ONLY);let r=ye(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(n)}_removePropertyEffect(t,e,n){let r=ye(this,e,!0)[t],s=r.indexOf(n);s>=0&&r.splice(s,1)}_hasPropertyEffect(t,e){let n=this[e];return Boolean(n&&n[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,pe.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,pe.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,pe.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,pe.COMPUTE)}_setPendingPropertyOrPath(t,e,n,r){if(r||Dt(Array.isArray(t)?t[0]:t)!==t){if(!r){let n=Jt(this,t);if(!(t=qt(this,t,e))||!super._shouldPropertyChange(t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,n))return function(t,e,n){let r=t.__dataLinkedPaths;if(r){let s;for(let i in r){let o=r[i];Ft(i,e)?(s=Ht(i,o,e),t._setPendingPropertyOrPath(s,n,!0,!0)):Ft(o,e)&&(s=Ht(o,i,e),t._setPendingPropertyOrPath(s,n,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,n);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,n){n===t[e]&&"object"!=typeof n||("className"===e&&(t=I(t)),t[e]=n)}_setPendingProperty(t,e,n){let r=this.__dataHasPaths&&Mt(t),s=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,s[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[pe.NOTIFY]&&this[pe.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=n),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let n=t[e];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let n in t)!e&&this[pe.READ_ONLY]&&this[pe.READ_ONLY][n]||this._setPendingPropertyOrPath(n,t[n],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,n){let r,s=this.__dataHasPaths;this.__dataHasPaths=!1,Oe(this,e,n,s),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,n,s),this._flushClients(),ge(this,this[pe.REFLECT],e,n,s),ge(this,this[pe.OBSERVE],e,n,s),r&&function(t,e,n,r,s){let i,o,a=t[pe.NOTIFY],l=_e++;for(let o in e)e[o]&&(a&&be(t,a,l,o,n,r,s)||s&&Ce(t,o,n))&&(i=!0);i&&(o=t.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}(this,r,e,n,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,n){this[pe.PROPAGATE]&&ge(this,this[pe.PROPAGATE],t,e,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,n)}_runEffectsForTemplate(t,e,n,r){const s=(e,r)=>{ge(this,t.propertyEffects,e,n,r,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,n,r)};t.runEffects?t.runEffects(s,e,r):s(e,r)}linkPaths(t,e){t=jt(t),e=jt(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=jt(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let n={path:""};$e(this,Jt(this,t,n),n.path,e)}get(t,e){return Jt(e||this,t)}set(t,e,n){n?qt(n,t,e):this[pe.READ_ONLY]&&this[pe.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let n={path:""},r=Jt(this,t,n),s=r.length,i=r.push(...e);return e.length&&Ue(this,r,n.path,s,e.length,[]),i}pop(t){let e={path:""},n=Jt(this,t,e),r=Boolean(n.length),s=n.pop();return r&&Ue(this,n,e.path,n.length,0,[s]),s}splice(t,e,n,...r){let s,i={path:""},o=Jt(this,t,i);return e<0?e=o.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?o.splice(e):o.splice(e,n,...r),(r.length||s.length)&&Ue(this,o,i.path,e,r.length,s),s}shift(t){let e={path:""},n=Jt(this,t,e),r=Boolean(n.length),s=n.shift();return r&&Ue(this,n,e.path,0,0,[s]),s}unshift(t,...e){let n={path:""},r=Jt(this,t,n),s=r.unshift(...e);return e.length&&Ue(this,r,n.path,0,e.length,[]),s}notifyPath(t,e){let n;if(1==arguments.length){let r={path:""};e=Jt(this,t,r),n=r.path}else n=Array.isArray(t)?jt(t):t;this._setPendingPropertyOrPath(n,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var n;this._addPropertyEffect(t,pe.READ_ONLY),e&&(this["_set"+(n=t,n[0].toUpperCase()+n.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,n){let r={property:t,method:e,dynamicFn:Boolean(n)};this._addPropertyEffect(t,pe.OBSERVE,{fn:ve,info:r,trigger:{name:t}}),n&&this._addPropertyEffect(e,pe.OBSERVE,{fn:ve,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let n=Je(t);if(!n)throw new Error("Malformed observer expression '"+t+"'");De(this,n,pe.OBSERVE,Re,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,pe.NOTIFY,{fn:Ee,info:{eventName:Xt(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,pe.REFLECT,{fn:Te,info:{attrName:e}})}_createComputedProperty(t,e,n){let r=Je(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const s=De(this,r,pe.COMPUTE,xe,t,n);ye(this,fe)[t]=s}_marshalArgs(t,e,n){const r=this.__data,s=[];for(let i=0,o=t.length;i<o;i++){let{name:o,structured:a,wildcard:l,value:h,literal:c}=t[i];if(!c)if(l){const t=Ft(o,e),s=Ye(r,n,t?e:o);h={path:t?e:o,value:s,base:t?Jt(r,o):s}}else h=a?Ye(r,n,o):r[o];s[i]=h}return s}static addPropertyEffect(t,e,n){this.prototype._addPropertyEffect(t,e,n)}static createPropertyObserver(t,e,n){this.prototype._createPropertyObserver(t,e,n)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,n){this.prototype._createComputedProperty(t,e,n)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let n=this.constructor._parseTemplate(t),r=this.__preBoundTemplateInfo==n;if(!r)for(let t in n.propertyEffects)this._createPropertyAccessor(t);if(e)if(n=Object.create(n),n.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;n.parent=e,e.lastChild=n,n.previousSibling=r,r?r.nextSibling=n:e.firstChild=n}else this.__templateInfo=n;else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(t,e,n){(t.hostProps=t.hostProps||{})[e]=!0;let r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(n)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Xe.push(this);let n=super._stampTemplate(t,e);if(Xe.pop(),e.nodeList=n.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=n.firstChild;e;e=e.nextSibling)t.push(e)}return n.templateInfo=e,function(t,e){let{nodeList:n,nodeInfoList:r}=e;if(r.length)for(let e=0;e<r.length;e++){let s=r[e],i=n[e],o=s.bindings;if(o)for(let e=0;e<o.length;e++){let n=o[e];Le(i,n),Me(i,t,n)}i.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:n,nextSibling:r,parent:s}=e;n?n.nextSibling=r:s&&(s.firstChild=r),r?r.previousSibling=n:s&&(s.lastChild=n),e.nextSibling=e.previousSibling=null;let i=e.childNodes;for(let t=0;t<i.length;t++){let e=i[t];I(I(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,n,r){let s=e._parseTemplateNode.call(this,t,n,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,n);e&&(t.textContent=Be(e)||" ",Se(this,n,r,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,n,r,s,i){let o=this._parseBindings(i,n);if(o){let e=s,i="property";me.test(s)?i="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),i="attribute");let a=Be(o);return a&&"attribute"==i&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==i&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===i&&(s=Vt(s)),Se(this,n,r,i,s,o,a),!0}return e._parseTemplateNodeAttribute.call(this,t,n,r,s,i)}static _parseTemplateNestedTemplate(t,n,r){let s=e._parseTemplateNestedTemplate.call(this,t,n,r);const i=t.parentNode,o=r.templateInfo;i.localName,i.localName;let a=o.hostProps;{let t="{";for(let e in a){Se(this,n,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}}return s}static _parseBindings(t,e){let n,r=[],s=0;for(;null!==(n=je.exec(t));){n.index>s&&r.push({literal:t.slice(s,n.index)});let i=n[1][0],o=Boolean(n[2]),a=n[3].trim(),l=!1,h="",c=-1;"{"==i&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Je(a),_=[];if(d){let{args:t,methodName:n}=d;for(let e=0;e<t.length;e++){let n=t[e];n.literal||_.push(n)}let r=e.dynamicFns;(r&&r[n]||d.static)&&(_.push(n),d.dynamicFn=!0)}else _.push(a);r.push({source:a,mode:i,negate:o,customEvent:l,signature:d,dependencies:_,event:h}),s=je.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,n,r,s,i){let o;return o=e.signature?Re(t,n,r,0,e.signature):n!=e.source?Jt(t,e.source):i&&Mt(n)?Jt(t,n):t.__data[n],e.negate&&(o=!o),o}}})),Xe=[];const Ge=d((t=>{const e=Wt(t);function n(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const n=t.properties;n&&(e=function(t){const e={};for(let n in t){const r=t[n];e[n]="function"==typeof r?{type:r}:r}return e}(n))}t.__ownProperties=e}return t.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){this.prototype;const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=n(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=r(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=n(this);this.__properties=Object.assign({},t&&t._properties,r(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s})),We=d((t=>{const e=Ge(Ve(t));function n(t,e,n,r){n.computed&&(n.readOnly=!0),n.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,n.computed,r)),n.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!n.computed):!1===n.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),n.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===n.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),n.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===n.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),n.observer&&t._createPropertyObserver(e,n.observer,r[n.observer]),t._addPropertyToAttributeMap(e)}function r(t,e,n,r){{const s=e.content.querySelectorAll("style"),i=It(e),o=function(t){let e=At(t);return e?kt(e):[]}(n),a=e.content.firstElementChild;for(let n=0;n<o.length;n++){let s=o[n];s.textContent=t._processStyleText(s.textContent,r),e.content.insertBefore(s,a)}let l=0;for(let e=0;e<i.length;e++){let n=i[e],o=s[l];o!==n?(n=n.cloneNode(!0),o.parentNode.insertBefore(n,o)):l++,n.textContent=t._processStyleText(n.textContent,r)}}}return class extends e{static get polymerElementVersion(){return"3.5.0"}static _finalizeClass(){e._finalizeClass.call(this);const t=((n=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",n))||(n.__ownObservers=n.hasOwnProperty(JSCompiler_renameProperty("observers",n))?n.observers:null),n.__ownObservers);var n;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):x||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)n(this.prototype,e,t[e],t)}static createObservers(t,e){const n=this.prototype;for(let r=0;r<t.length;r++)n._createMethodObserver(t[r],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!A||N)&&(e=wt.import(t,"template"),A&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=C(t.url);else{const t=wt.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=E,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let n in e){let r=e[n];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[n]=r)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let n=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return v(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const n=this.importPath;r(this,e,t,n?P(n):""),this.prototype._bindTemplate(e)}}connectedCallback(){super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=I(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),e.shadowRoot.appendChild(t),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){for(const[e,n]of Object.entries(t))this.style.setProperty(e,n)}resolveUrl(t,e){return!e&&this.importPath&&(e=P(this.importPath)),P(t,e)}static _parseTemplateContent(t,n,r){return n.dynamicFns=n.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,n,r)}static _addTemplatePropertyEffect(t,n,r){return e._addTemplatePropertyEffect.call(this,t,n,r)}}})),Ze=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Ke{constructor(t,e){en(t,e);const n=e.reduce(((e,n,r)=>e+Qe(n)+t[r+1]),t[0]);this.value=n.toString()}toString(){return this.value}}function Qe(t){if(t instanceof Ke)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const tn=function(t,...e){en(t,e);const n=document.createElement("template");let r=e.reduce(((e,n,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Ke)return Qe(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(n)+t[r+1]),t[0]);return Ze&&(r=Ze.createHTML(r)),n.innerHTML=r,n},en=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},nn=We(HTMLElement);function rn(t,e,n){return{index:t,removed:e,addedCount:n}}const sn=0,on=1,an=2,ln=3;function hn(t,e,n,r,s,i){let o,a=0,l=0,h=Math.min(n-e,i-s);if(0==e&&0==s&&(a=function(t,e,n){for(let r=0;r<n;r++)if(!dn(t[r],e[r]))return r;return n}(t,r,h)),n==t.length&&i==r.length&&(l=function(t,e,n){let r=t.length,s=e.length,i=0;for(;i<n&&dn(t[--r],e[--s]);)i++;return i}(t,r,h-a)),s+=a,i-=l,(n-=l)-(e+=a)==0&&i-s==0)return[];if(e==n){for(o=rn(e,[],0);s<i;)o.removed.push(r[s++]);return[o]}if(s==i)return[rn(e,[],n-e)];let c=function(t){let e=t.length-1,n=t[0].length-1,r=t[e][n],s=[];for(;e>0||n>0;){if(0==e){s.push(an),n--;continue}if(0==n){s.push(ln),e--;continue}let i,o=t[e-1][n-1],a=t[e-1][n],l=t[e][n-1];i=a<l?a<o?a:o:l<o?l:o,i==o?(o==r?s.push(sn):(s.push(on),r=o),e--,n--):i==a?(s.push(ln),e--,r=a):(s.push(an),n--,r=l)}return s.reverse(),s}(function(t,e,n,r,s,i){let o=i-s+1,a=n-e+1,l=new Array(o);for(let t=0;t<o;t++)l[t]=new Array(a),l[t][0]=t;for(let t=0;t<a;t++)l[0][t]=t;for(let n=1;n<o;n++)for(let i=1;i<a;i++)if(dn(t[e+i-1],r[s+n-1]))l[n][i]=l[n-1][i-1];else{let t=l[n-1][i]+1,e=l[n][i-1]+1;l[n][i]=t<e?t:e}return l}(t,e,n,r,s,i));o=void 0;let d=[],_=e,u=s;for(let t=0;t<c.length;t++)switch(c[t]){case sn:o&&(d.push(o),o=void 0),_++,u++;break;case on:o||(o=rn(_,[],0)),o.addedCount++,_++,o.removed.push(r[u]),u++;break;case an:o||(o=rn(_,[],0)),o.addedCount++,_++;break;case ln:o||(o=rn(_,[],0)),o.removed.push(r[u]),u++}return o&&d.push(o),d}function cn(t,e){return hn(t,0,t.length,e,0,e.length)}function dn(t,e){return t===e}let _n=d((t=>{let e=We(t);return class extends e{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(t,e){let n=e.path;if(n==JSCompiler_renameProperty("items",this)){let n=e.base||[],r=this.__lastItems;if(t!==this.__lastMulti&&this.clearSelection(),r){let t=cn(n,r);this.__applySplices(t)}this.__lastItems=n,this.__lastMulti=t}else if(e.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(e.value.indexSplices);else{let t=n.slice(`${JSCompiler_renameProperty("items",this)}.`.length),e=parseInt(t,10);t.indexOf(".")<0&&t==e&&this.__deselectChangedIdx(e)}}__applySplices(t){let e=this.__selectedMap;for(let n=0;n<t.length;n++){let r=t[n];e.forEach(((t,n)=>{t<r.index||(t>=r.index+r.removed.length?e.set(n,t+r.addedCount-r.removed.length):e.set(n,-1))}));for(let t=0;t<r.addedCount;t++){let n=r.index+t;e.has(this.items[n])&&e.set(this.items[n],n)}}this.__updateLinks();let n=0;e.forEach(((t,r)=>{t<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null,e.delete(r)):n++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let t=0;this.__selectedMap.forEach((e=>{e>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${e}`,`${JSCompiler_renameProperty("selected",this)}.${t++}`)}))}else this.__selectedMap.forEach((t=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${t}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${t}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(t){return this.__selectedMap.has(t)}isIndexSelected(t){return this.isSelected(this.items[t])}__deselectChangedIdx(t){let e=this.__selectedIndexForItemIndex(t);if(e>=0){let t=0;this.__selectedMap.forEach(((n,r)=>{e==t++&&this.deselect(r)}))}}__selectedIndexForItemIndex(t){let e=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${t}`];if(e)return parseInt(e.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(t){let e=this.__selectedMap.get(t);if(e>=0){let n;this.__selectedMap.delete(t),this.multi&&(n=this.__selectedIndexForItemIndex(e)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),n,1):this.selected=this.selectedItem=null}}deselectIndex(t){this.deselect(this.items[t])}select(t){this.selectIndex(this.items.indexOf(t))}selectIndex(t){let e=this.items[t];this.isSelected(e)?this.toggle&&this.deselectIndex(t):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(e,t),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),e):this.selected=this.selectedItem=e)}}}))(nn);class un extends _n{static get is(){return"array-selector"}static get template(){return null}}customElements.define(un.is,un);const pn=function(){let t,e;do{t=!1,e=f()}while(e)};function fn(t,e,n,r,s){let i;s&&(i="object"==typeof n&&null!==n,i&&(r=t.__dataTemp[e]));let o=r!==n&&(r==r||n==n);return i&&o&&(t.__dataTemp[e]=n),o}const mn=d((t=>class extends t{_shouldPropertyChange(t,e,n){return fn(this,t,e,n,!0)}})),yn=d((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,n){return fn(this,t,e,n,this.mutableData)}}));mn._mutablePropertyChange=fn;let gn=null;function bn(){return gn}bn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:bn,writable:!0}});const Pn=Ve(bn),vn=mn(Pn);const Cn=Ve(class{});class wn extends Cn{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let n=this.__templatizeOptions;(t&&n.instanceProps||!n.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,n){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,n(t)}));else{let r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,n)}}_showHideChildren(t){!function(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(Boolean(t)!=Boolean(r.__hideTemplateChildren__))if(r.nodeType===Node.TEXT_NODE)t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__;else if("slot"===r.localName)if(t)r.__polymerReplaced__=document.createComment("hidden-slot"),I(I(r).parentNode).replaceChild(r.__polymerReplaced__,r);else{const t=r.__polymerReplaced__;t&&I(I(t).parentNode).replaceChild(r,t)}else r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__);r.__hideTemplateChildren__=t,r._showHideChildren&&r._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,n){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=n:super._setUnmanagedPropertyToNode(t,e,n)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}wn.prototype.__dataHost,wn.prototype.__templatizeOptions,wn.prototype._methodHost,wn.prototype.__templatizeOwner,wn.prototype.__hostProps;const En=mn(wn);function Tn(t){let e=t.__dataHost;return e&&e._methodHost||e}function On(t,e,n){let r=n.mutableData?En:wn;Sn.mixin&&(r=Sn.mixin(r));let s=class extends r{};return s.prototype.__templatizeOptions=n,s.prototype._bindTemplate(t),function(t,e,n,r){let s=n.hostProps||{};for(let e in r.instanceProps){delete s[e];let n=r.notifyInstanceProp;n&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:xn(e,n)})}if(r.forwardHostProp&&e.__dataHost)for(let e in s)n.hasHostProps||(n.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,n){t.__dataHost._setPendingPropertyOrPath("_host_"+e,n[e],!0,!0)}})}(s,t,e,n),s}function An(t,e,n,r){let s=n.forwardHostProp;if(s&&e.hasHostProps){const r="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(r){let t=n.mutableData?vn:Pn;class r extends t{}a=e.templatizeTemplateClass=r}else{const n=t.constructor;class r extends n{}a=e.templatizeTemplateClass=r}let i=e.hostProps;for(let t in i)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Nn(t,s)}),a.prototype._createNotifyingProperty("_host_"+t)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)o=a,gn=i=t,Object.setPrototypeOf(i,o.prototype),new o,gn=null,t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,a.prototype);const n=e.hostProps;for(let e in n)if(e="_host_"+e,e in t){const n=t[e];delete t[e],t.__data[e]=n}}}var i,o}function Nn(t,e){return function(t,n,r){e.call(t.__templatizeOwner,n.substring(6),r[n])}}function xn(t,e){return function(t,n,r){e.call(t.__templatizeOwner,t,n,r[n])}}function Sn(t,e,n){if(A&&!Tn(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(n=n||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let r=(e?e.constructor:wn)._parseTemplate(t),s=r.templatizeInstanceClass;s||(s=On(t,r,n),r.templatizeInstanceClass=s);const i=Tn(t);An(t,r,n);let o=class extends s{};return o.prototype._methodHost=i,o.prototype.__dataHost=t,o.prototype.__templatizeOwner=e,o.prototype.__hostProps=r.hostProps,o}function In(t,e){let n;for(;e;)if(n=e.__dataHost?e:e.__templatizeInstance){if(n.__dataHost==t)return n;e=n.__dataHost}else e=I(e).parentNode;return null}class kn extends nn{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=_.debounce(this.__renderDebouncer,h,(()=>this.__render())),p(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const t=I(this).parentNode;t&&(t.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||I(t).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),this.style.display="none",this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const t=this;let e=t._templateInfo?t:I(t).querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!I(this).querySelector("template"))throw new Error("dom-if requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}this.__template=e}return!0}__ensureInstance(){let t=I(this).parentNode;if(this.__hasInstance()){let e=this.__getInstanceNodes();if(e&&e.length){if(I(this).previousSibling!==e[e.length-1])for(let n,r=0;r<e.length&&(n=e[r]);r++)I(t).insertBefore(n,this)}}else{if(!t)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(t)}return!0}render(){pn()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),this.if!=this._lastIf&&(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(t){}__teardownInstance(){}_showHideChildren(){}}const Ln=class extends kn{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(t){this.__ctor||(this.__ctor=Sn(this.__template,this,{mutableData:!0,forwardHostProp:function(t,e){this.__instance&&(this.if?this.__instance.forwardHostProp(t,e):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[Dt(t)]=!0))}})),this.__instance=new this.__ctor,I(t).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let t=this.__instance.children;if(t&&t.length){let e=I(t[0]).parentNode;if(e){e=I(e);for(let n,r=0;r<t.length&&(n=t[r]);r++)e.removeChild(n)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let t=this.__invalidProps;if(t){this.__invalidProps=null;for(let e in t)this.__instance._setPendingProperty(e,this.__dataHost[e]);this.__instance._flushProperties()}}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,this.__instance._showHideChildren(t)),t||this.__syncHostProperties()}};customElements.define(Ln.is,Ln);const Mn=yn(nn);class Dn extends Mn{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!0,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),this.style.display="none",this.__isDetached){this.__isDetached=!1;let t=I(I(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let n={};n[this.as]=!0,n[this.indexAs]=!0,n[this.itemsIndexAs]=!0,this.__ctor=Sn(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:n,forwardHostProp:function(t,e){let n=this.__instances;for(let r,s=0;s<n.length&&(r=n[s]);s++)r.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,n){if(zt(this.as,e)){let r=t[this.itemsIndexAs];e==this.as&&(this.items[r]=n);let s=Ht(this.as,`${JSCompiler_renameProperty("items",this)}.${r}`,e);this.notifyPath(s,n)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,n=this.__getMethodHost();return function(){return n[e].apply(n,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let n=0;n<e.length;n++)0===t.indexOf(e[n])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=_.debounce(this.__renderDebouncer,e>0?o.after(e):h,t.bind(this)),p(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),pn()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),n=this.__calculateLimit(e.length);this.__updateInstances(t,n,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=n;return this.__filterFn&&(e=e.filter(((e,n,r)=>this.__filterFn(t[e],n,r)))),this.__sortFn&&e.sort(((e,n)=>this.__sortFn(t[e],t[n]))),e}__calculateLimit(t){let e=t;const n=this.__instances.length;if(this.initialCount){let r;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),r=Math.max(e-n,0),this.__chunkCount=r||1):(r=Math.min(Math.max(t-n,0),this.__chunkCount),e=Math.min(n+r,t)),this.__shouldMeasureChunk=r===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,n){const r=this.__itemsIdxToInstIdx={};let s;for(s=0;s<e;s++){let e=this.__instances[s],i=n[s],o=t[i];r[i]=s,e?(e._setPendingProperty(this.as,o),e._setPendingProperty(this.indexAs,s),e._setPendingProperty(this.itemsIndexAs,i),e._flushProperties()):this.__insertInstance(o,s,i)}for(let t=this.__instances.length-1;t>=s;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const n=I(e.root);for(let t=0;t<e.children.length;t++){let r=e.children[t];n.appendChild(r)}return e}__attachInstance(t,e){let n=this.__instances[t];e.insertBefore(n.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,n){let r={};return r[this.as]=t,r[this.indexAs]=e,r[this.itemsIndexAs]=n,new this.__ctor(r)}__insertInstance(t,e,n){const r=this.__stampInstance(t,e,n);let s=this.__instances[e+1],i=s?s.children[0]:this;return I(I(this).parentNode).insertBefore(r.root,i),this.__instances[e]=r,r}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let n=t.slice(6),r=n.indexOf("."),s=r<0?n:n.substring(0,r);if(s==parseInt(s,10)){let t=r<0?"":n.substring(r+1);this.__handleObservedPaths(t);let i=this.__itemsIdxToInstIdx[s],o=this.__instances[i];if(o){let n=this.as+(t?"."+t:"");o._setPendingPropertyOrPath(n,e,!1,!0),o._flushProperties()}return!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return In(this.template,t)}}customElements.define(Dn.is,Dn);const Rn=d((t=>class extends t{_addEventListenerToNode(t,e,n){it(t,e,n)||super._addEventListenerToNode(t,e,n)}_removeEventListenerFromNode(t,e,n){ot(t,e,n)||super._removeEventListenerFromNode(t,e,n)}}));let Fn=!1,Hn=[],zn=[];function jn(){Fn=!0,requestAnimationFrame((function(){Fn=!1,function(t){for(;t.length;)Bn(t.shift())}(Hn),setTimeout((function(){!function(t){for(let e=0,n=t.length;e<n;e++)Bn(t.shift())}(zn)}))}))}function Bn(t){const e=t[0],n=t[1],r=t[2];try{n.apply(e,r)}catch(t){setTimeout((()=>{throw t}))}}function Jn(t,e,n){Fn||jn(),Hn.push([t,e,n])}function qn(t,e,n){Fn||jn(),zn.push([t,e,n])}function Yn(){document.body.removeAttribute("unresolved")}function $n(t){return"slot"===t.localName}"interactive"===document.readyState||"complete"===document.readyState?Yn():window.addEventListener("DOMContentLoaded",Yn);let Un=class{static getFlattenedNodes(t){const e=I(t);return $n(t)?e.assignedNodes({flatten:!0}):Array.from(e.childNodes).map((t=>$n(t)?I(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){$n(this._target)?this._listenSlots([this._target]):I(this._target).children&&(this._listenSlots(I(this._target).children),this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0})),this._connected=!0}disconnect(){$n(this._target)?this._unlistenSlots([this._target]):I(this._target).children&&(this._unlistenSlots(I(this._target).children),this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,h.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let n=t[e];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}flush(){if(!this._connected)return!1;this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),n=cn(e,this._effectiveNodes);for(let e,r=0;r<n.length&&(e=n[r]);r++)for(let n,r=0;r<e.removed.length&&(n=e.removed[r]);r++)t.removedNodes.push(n);for(let r,s=0;s<n.length&&(r=n[s]);s++)for(let n=r.index;n<r.index+r.addedCount;n++)t.addedNodes.push(e[n]);this._effectiveNodes=e;let r=!1;return(t.addedNodes.length||t.removedNodes.length)&&(r=!0,this.callback.call(this._target,t)),r}_listenSlots(t){for(let e=0;e<t.length;e++){let n=t[e];$n(n)&&n.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let n=t[e];$n(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}};const Vn=Element.prototype,Xn=Vn.matches||Vn.matchesSelector||Vn.mozMatchesSelector||Vn.msMatchesSelector||Vn.oMatchesSelector||Vn.webkitMatchesSelector,Gn=function(t,e){return Xn.call(t,e)};class Wn{constructor(t){this.node=t}observeNodes(t){return new Un(this.node,t)}unobserveNodes(t){t.disconnect()}notifyObserver(){}deepContains(t){if(I(this.node).contains(t))return!0;let e=t,n=t.ownerDocument;for(;e&&e!==n&&e!==this.node;)e=I(e).parentNode||I(e).host;return e===this.node}getOwnerRoot(){return I(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?I(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let t=[],e=I(this.node).assignedSlot;for(;e;)t.push(e),e=I(e).assignedSlot;return t}importNode(t,e){let n=this.node instanceof Document?this.node:this.node.ownerDocument;return I(n).importNode(t,e)}getEffectiveChildNodes(){return Un.getFlattenedNodes(this.node)}queryDistributedElements(t){let e=this.getEffectiveChildNodes(),n=[];for(let r,s=0,i=e.length;s<i&&(r=e[s]);s++)r.nodeType===Node.ELEMENT_NODE&&Gn(r,t)&&n.push(r);return n}get activeElement(){let t=this.node;return void 0!==t._activeElement?t._activeElement:t.activeElement}}function Zn(t,e){for(let n=0;n<e.length;n++){let r=e[n];Object.defineProperty(t,r,{get:function(){return this.node[r]},configurable:!0})}}class Kn{constructor(t){this.event=t}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}Wn.prototype.cloneNode,Wn.prototype.appendChild,Wn.prototype.insertBefore,Wn.prototype.removeChild,Wn.prototype.replaceChild,Wn.prototype.setAttribute,Wn.prototype.removeAttribute,Wn.prototype.querySelector,Wn.prototype.querySelectorAll,Wn.prototype.parentNode,Wn.prototype.firstChild,Wn.prototype.lastChild,Wn.prototype.nextSibling,Wn.prototype.previousSibling,Wn.prototype.firstElementChild,Wn.prototype.lastElementChild,Wn.prototype.nextElementSibling,Wn.prototype.previousElementSibling,Wn.prototype.childNodes,Wn.prototype.children,Wn.prototype.classList,Wn.prototype.textContent,Wn.prototype.innerHTML;let Qn=Wn;!function(t,e){for(let n=0;n<e.length;n++){let r=e[n];t[r]=function(){return this.node[r].apply(this.node,arguments)}}}(Wn.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll","attachShadow"]),Zn(Wn.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList","shadowRoot"]),function(t,e){for(let n=0;n<e.length;n++){let r=e[n];Object.defineProperty(t,r,{get:function(){return this.node[r]},set:function(t){this.node[r]=t},configurable:!0})}}(Wn.prototype,["textContent","innerHTML","className"]);const tr=function(t){if((t=t||document)instanceof Qn)return t;if(t instanceof Kn)return t;let e=t.__domApi;return e||(e=t instanceof Event?new Kn(t):new Qn(t),t.__domApi=e),e};const er="disable-upgrade",nr=t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]};d((t=>{const e=We(t);let n=nr(e);return class extends e{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return n.call(this).concat(er)}_initializeProperties(){this.hasAttribute(er)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,n,r){t==er?this.__isUpgradeDisabled&&null==n&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,I(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,n,r)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));const rr="disable-upgrade";const sr=d((t=>{const e=Rn(We(t)),n=nr(e),r={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class s extends e{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(t,e,n){(this.__dataAttributes&&this.__dataAttributes[t]||t===rr)&&this.attributeChangedCallback(t,e,n,null)}setAttribute(t,e){super.setAttribute(t,e)}removeAttribute(t){super.removeAttribute(t)}static get observedAttributes(){return n.call(this).concat(rr)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(t,e,n,r){e!==n&&(t==rr?this.__isUpgradeDisabled&&null==n&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,I(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(t,e,n,r),this.attributeChanged(t,e,n)))}attributeChanged(t,e,n){}_initializeProperties(){if(x&&this.hasAttribute(rr))this.__isUpgradeDisabled=!0;else{let t=Object.getPrototypeOf(this);t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))||(this._registered(),t.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),this._applyListeners()}}_takeAttributes(){const t=this.attributes;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.__attributeReaction(n.name,null,n.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(t){return this._serializeValue(t)}deserialize(t,e){return this._deserializeValue(t,e)}reflectPropertyToAttribute(t,e,n){this._propertyToAttribute(t,e,n)}serializeValueToAttribute(t,e,n){this._valueToNodeAttribute(n||this,t,e)}extend(t,e){if(!t||!e)return t||e;let n=Object.getOwnPropertyNames(e);for(let r,s=0;s<n.length&&(r=n[s]);s++){let n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n)}return t}mixin(t,e){for(let n in e)t[n]=e[n];return t}chainObject(t,e){return t&&e&&t!==e&&(t.__proto__=e),t}instanceTemplate(t){let e=this.constructor._contentForTemplate(t);return document.importNode(e,!0)}fire(t,e,n){n=n||{},e=null==e?{}:e;let r=new Event(t,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});r.detail=e;let s=n.node||this;return I(s).dispatchEvent(r),r}listen(t,e,n){t=t||this;let r=this.__boundListeners||(this.__boundListeners=new WeakMap),s=r.get(t);s||(s={},r.set(t,s));let i=e+n;s[i]||(s[i]=this._addMethodEventListenerToNode(t,e,n,this))}unlisten(t,e,n){t=t||this;let r=this.__boundListeners&&this.__boundListeners.get(t),s=e+n,i=r&&r[s];i&&(this._removeEventListenerFromNode(t,e,i),r[s]=null)}setScrollDirection(t,e){lt(e||this,r[t]||"auto")}$$(t){return this.root.querySelector(t)}get domHost(){let t=I(this).getRootNode();return t instanceof DocumentFragment?t.host:t}distributeContent(){tr(this)}getEffectiveChildNodes(){return tr(this).getEffectiveChildNodes()}queryDistributedElements(t){return tr(this).queryDistributedElements(t)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let t=this.getEffectiveChildNodes(),e=[];for(let n,r=0;n=t[r];r++)n.nodeType!==Node.COMMENT_NODE&&e.push(n.textContent);return e.join("")}queryEffectiveChildren(t){let e=this.queryDistributedElements(t);return e&&e[0]}queryAllEffectiveChildren(t){return this.queryDistributedElements(t)}getContentChildNodes(t){let e=this.root.querySelector(t||"slot");return e?tr(e).getDistributedNodes():[]}getContentChildren(t){return this.getContentChildNodes(t).filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(t){const e=this;return e!==t&&I(e).contains(t)&&I(e).getRootNode()===I(t).getRootNode()}isLocalDescendant(t){return this.root===I(t).getRootNode()}scopeSubtree(t,e=!1){return null}getComputedStyleValue(t){return false.getComputedStyleValue(this,t)}debounce(t,e,n){return this._debouncers=this._debouncers||{},this._debouncers[t]=_.debounce(this._debouncers[t],n>0?o.after(n):h,e.bind(this))}isDebouncerActive(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];return!(!e||!e.isActive())}flushDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.flush()}cancelDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.cancel()}async(t,e){return e>0?o.run(t.bind(this),e):~h.run(t.bind(this))}cancelAsync(t){t<0?h.cancel(~t):o.cancel(t)}create(t,e){let n=document.createElement(t);if(e)if(n.setProperties)n.setProperties(e);else for(let t in e)n[t]=e[t];return n}elementMatches(t,e){return Gn(e||this,t)}toggleAttribute(t,e){let n=this;return 3===arguments.length&&(n=arguments[2]),1==arguments.length&&(e=!n.hasAttribute(t)),e?(I(n).setAttribute(t,""),!0):(I(n).removeAttribute(t),!1)}toggleClass(t,e,n){n=n||this,1==arguments.length&&(e=!n.classList.contains(t)),e?n.classList.add(t):n.classList.remove(t)}transform(t,e){(e=e||this).style.webkitTransform=t,e.style.transform=t}translate3d(t,e,n,r){r=r||this,this.transform("translate3d("+t+","+e+","+n+")",r)}arrayDelete(t,e){let n;if(Array.isArray(t)){if(n=t.indexOf(e),n>=0)return t.splice(n,1)}else{if(n=Jt(this,t).indexOf(e),n>=0)return this.splice(t,n,1)}return null}_logger(t,e){switch(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),t){case"log":case"warn":case"error":console[t](...e)}}_log(...t){this._logger("log",t)}_warn(...t){this._logger("warn",t)}_error(...t){this._logger("error",t)}_logf(t,...e){return["[%s::%s]",this.is,t,...e]}}return s.prototype.is="",s})),ir={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},or={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},ar=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},or);function lr(t,e){return ur({},sr(e),t)}function hr(t,e,n,r){!function(t,e,n){const r=t._noAccessors,s=Object.getOwnPropertyNames(t);for(let i=0;i<s.length;i++){let o=s[i];if(!(o in n))if(r)e[o]=t[o];else{let n=Object.getOwnPropertyDescriptor(t,o);n&&(n.configurable=!0,Object.defineProperty(e,o,n))}}}(e,t,r);for(let t in ir)e[t]&&(n[t]=n[t]||[],n[t].push(e[t]))}function cr(t,e,n){e=e||[];for(let r=t.length-1;r>=0;r--){let s=t[r];s?Array.isArray(s)?cr(s,e):e.indexOf(s)<0&&(!n||n.indexOf(s)<0)&&e.unshift(s):console.warn("behavior is null, check for missing or 404 import")}return e}function dr(t,e){for(const n in e){const r=t[n],s=e[n];t[n]=!("value"in s)&&r&&"value"in r?Object.assign({value:r.value},s):s}}const _r=sr(HTMLElement);function ur(t,e,n){let r;const s={};class i extends e{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(r)for(let t,e=0;e<r.length;e++)t=r[e],t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties);t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties),this._prepareTemplate()}else e._finalizeClass.call(this)}static get properties(){const e={};if(r)for(let t=0;t<r.length;t++)dr(e,r[t].properties);return dr(e,t.properties),e}static get observers(){let e=[];if(r)for(let t,n=0;n<r.length;n++)t=r[n],t.observers&&(e=e.concat(t.observers));return t.observers&&(e=e.concat(t.observers)),e}created(){super.created();const t=s.created;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}_registered(){const t=i.prototype;if(!t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))){t.__hasRegisterFinished=!0,super._registered(),x&&o(t);const e=Object.getPrototypeOf(this);let n=s.beforeRegister;if(n)for(let t=0;t<n.length;t++)n[t].call(e);if(n=s.registered,n)for(let t=0;t<n.length;t++)n[t].call(e)}}_applyListeners(){super._applyListeners();const t=s.listeners;if(t)for(let e=0;e<t.length;e++){const n=t[e];if(n)for(let t in n)this._addMethodEventListenerToNode(this,t,n[t])}}_ensureAttributes(){const t=s.hostAttributes;if(t)for(let e=t.length-1;e>=0;e--){const n=t[e];for(let t in n)this._ensureAttribute(t,n[t])}super._ensureAttributes()}ready(){super.ready();let t=s.ready;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attached(){super.attached();let t=s.attached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}detached(){super.detached();let t=s.detached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attributeChanged(t,e,n){super.attributeChanged();let r=s.attributeChanged;if(r)for(let s=0;s<r.length;s++)r[s].call(this,t,e,n)}}if(n){Array.isArray(n)||(n=[n]);let t=e.prototype.behaviors;r=cr(n,null,t),i.prototype.behaviors=t?t.concat(n):r}const o=e=>{r&&function(t,e,n){for(let r=0;r<e.length;r++)hr(t,e[r],n,ar)}(e,r,s),hr(e,t,s,or)};return x||o(i.prototype),i.generatedFrom=t,i}let pr;pr=mn._mutablePropertyChange;const fr={properties:{mutableData:Boolean},_shouldPropertyChange(t,e,n){return pr(this,t,e,n,this.mutableData)}},mr=function(t){let e;return e="function"==typeof t?t:mr.Class(t),t._legacyForceObservedAttributes&&(e.prototype._legacyForceObservedAttributes=t._legacyForceObservedAttributes),customElements.define(e.is,e),e};mr.Class=function(t,e){t||console.warn("Polymer.Class requires `info` argument");let n=e?e(_r):_r;return n=ur(t,n,t.behaviors),n.is=n.prototype.is=t.is,n};const yr={templatize(t,e){this._templatizerTemplate=t,this.ctor=Sn(t,this,{mutableData:Boolean(e),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(t){return new this.ctor(t)},modelForElement(t){return In(this._templatizerTemplate,t)}},gr=Rn(yn(Ve(HTMLElement)));customElements.define("dom-bind",class extends gr{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),A)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(t,e,n,r){this.mutableData=!0}connectedCallback(){this.style.display="none",this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){I(I(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let t=0;t<this.__children.length;t++)this.root.appendChild(this.__children[t])}render(){let t;if(!this.__children){if(t=t||this.querySelector("template"),!t){let e=new MutationObserver((()=>{if(t=this.querySelector("template"),!t)throw new Error("dom-bind requires a <template> child");e.disconnect(),this.render()}));return void e.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(let t=this.root.firstChild;t;t=t.nextSibling)this.__children[this.__children.length]=t;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}});const br="include";class Pr extends HTMLElement{constructor(){super(),this._style=null}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute(br);return e&&(t.removeAttribute(br),t.textContent=function(t){let e=t.trim().split(/\s+/),n="";for(let t=0;t<e.length;t++)n+=Lt(e[t]);return n}(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}window.customElements.define("custom-style",Pr);const vr=sr(HTMLElement).prototype;export{un as ArraySelector,vr as Base,_ as Debouncer,Ln as DomIf,Dn as DomRepeat,Un as FlattenedNodesObserver,fr as OptionalMutableDataBehavior,mr as Polymer,nn as PolymerElement,wn as TemplateInstanceBase,yr as Templatizer,qn as afterNextRender,a as animationFrame,Jn as beforeNextRender,cn as calculateSplices,Vt as dashToCamelCase,d as dedupingMixin,tr as dom,p as enqueueDebouncer,pn as flush,gt as gestures,Jt as get,tn as html,l as idlePeriod,zt as matches,h as microTask,lr as mixinBehaviors,Sn as templatize,o as timeOut,Ht as translate,w as useShadow};