UNPKG

@teipublisher/pb-components

Version:
197 lines 195 kB
/** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const e=!(window.ShadyDOM&&window.ShadyDOM.inUse);let t,i;function n(i){t=(!i||!i.shimcssproperties)&&(e||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(i=window.ShadyCSS.cssBuild);const r=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?t=window.ShadyCSS.nativeCss:window.ShadyCSS?(n(window.ShadyCSS),window.ShadyCSS=void 0):n(window.WebComponents&&window.WebComponents.flags);const s=t; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */class o{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function a(e){return d(c(e=l(e)),e)}function l(e){return e.replace(v.comments,"").replace(v.port,"")}function c(e){let t=new o;t.start=0,t.end=e.length;let i=t;for(let n=0,r=e.length;n<r;n++)if(e[n]===g){i.rules||(i.rules=[]);let e=i,t=e.rules[e.rules.length-1]||null;i=new o,i.start=n+1,i.parent=e,i.previous=t,e.rules.push(i)}else e[n]===b&&(i.end=n+1,i=i.parent||t);return t}function d(e,t){let i=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=i.trim(),e.parent){let n=e.previous?e.previous.end:e.parent.start;i=t.substring(n,e.start-1),i=h(i),i=i.replace(v.multipleSpaces," "),i=i.substring(i.lastIndexOf(";")+1);let r=e.parsedSelector=e.selector=i.trim();e.atRule=0===r.indexOf(P),e.atRule?0===r.indexOf(C)?e.type=y.MEDIA_RULE:r.match(v.keyframesRule)&&(e.type=y.KEYFRAMES_RULE,e.keyframesName=e.selector.split(v.multipleSpaces).pop()):0===r.indexOf(w)?e.type=y.MIXIN_RULE:e.type=y.STYLE_RULE}let n=e.rules;if(n)for(let e,i=0,r=n.length;i<r&&(e=n[i]);i++)d(e,t);return e}function h(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let e=arguments[1],t=6-e.length;for(;t--;)e="0"+e;return"\\"+e}))}function p(e,t,i=""){let n="";if(e.cssText||e.rules){let i=e.rules;if(i&&!u(i))for(let e,r=0,s=i.length;r<s&&(e=i[r]);r++)n=p(e,t,n);else n=t?e.cssText:_(e.cssText),n=n.trim(),n&&(n=" "+n+"\n")}return n&&(e.selector&&(i+=e.selector+" "+g+"\n"),i+=n,e.selector&&(i+=b+"\n\n")),i}function u(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(w)}function _(e){return m(e=f(e))}function f(e){return e.replace(v.customProp,"").replace(v.mixinProp,"")}function m(e){return e.replace(v.mixinApply,"").replace(v.varApply,"")}const y={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},g="{",b="}",v={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},w="--",C="@media",P="@",S=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,x=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,k=/@media\s(.*)/,E=new Set,A="shady-unscoped";function T(e){const t=e.textContent;if(!E.has(t)){E.add(t);const e=document.createElement("style");e.setAttribute("shady-unscoped",""),e.textContent=t,document.head.appendChild(e)}}function O(e){return e.hasAttribute(A)} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */function N(e,t){return e?("string"==typeof e&&(e=a(e)),t&&M(e,t),p(e,s)):""}function I(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=a(e.textContent)),e.__cssRules||null}function M(e,t,i,n){if(!e)return;let r=!1,s=e.type;if(n&&s===y.MEDIA_RULE){let t=e.selector.match(k);t&&(window.matchMedia(t[1]).matches||(r=!0))}s===y.STYLE_RULE?t(e):i&&s===y.KEYFRAMES_RULE?i(e):s===y.MIXIN_RULE&&(r=!0);let o=e.rules;if(o&&!r)for(let e,r=0,s=o.length;r<s&&(e=o[r]);r++)M(e,t,i,n)}function D(e,t){let i=0;for(let n=t,r=e.length;n<r;n++)if("("===e[n])i++;else if(")"===e[n]&&0==--i)return n;return-1}function R(e,t){let i=e.indexOf("var(");if(-1===i)return t(e,"","","");let n=D(e,i+3),r=e.substring(i+4,n),s=e.substring(0,i),o=R(e.substring(n+1),t),a=r.indexOf(",");return-1===a?t(s,r.trim(),"",o):t(s,r.substring(0,a).trim(),r.substring(a+1).trim(),o)}window.ShadyDOM&&window.ShadyDOM.wrap;function L(e){let t=e.localName,i="",n="";return t?t.indexOf("-")>-1?i=t:(n=t,i=e.getAttribute&&e.getAttribute("is")||""):(i=e.is,n=e.extends),{is:i,typeExtension:n}}function F(t){const i=[],n=t.querySelectorAll("style");for(let t=0;t<n.length;t++){const r=n[t];O(r)?e||(T(r),r.parentNode.removeChild(r)):(i.push(r.textContent),r.parentNode.removeChild(r))}return i.join("").trim()}const B="css-build";function H(e){if(void 0!==i)return i;if(void 0===e.__cssBuild){const t=e.getAttribute(B);if(t)e.__cssBuild=t;else{const t=j(e);""!==t&&U(e),e.__cssBuild=t}}return e.__cssBuild||""}function z(e){return""!==H(e)}function j(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;if(t instanceof Comment){const e=t.textContent.trim().split(":");if(e[0]===B)return e[1]}return""}function U(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */function K(e,t){for(let i in t)null===i?e.style.removeProperty(i):e.style.setProperty(i,t[i])}function q(e,t){const i=window.getComputedStyle(e).getPropertyValue(t);return i?i.trim():""}function $(e){const t=x.test(e)||S.test(e);return x.lastIndex=0,S.lastIndex=0,t} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const Y=/;\s*/m,V=/^\s*(initial)|(inherit)\s*$/,J=/\s*!important/,X="_-_";class W{constructor(){this._map={}}set(e,t){e=e.trim(),this._map[e]={properties:t,dependants:{}}}get(e){return e=e.trim(),this._map[e]||null}}let G=null;class Z{constructor(){this._currentElement=null,this._measureElement=null,this._map=new W}detectMixin(e){return $(e)}gatherStyles(e){const t=F(e.content);if(t){const i=document.createElement("style");return i.textContent=t,e.content.insertBefore(i,e.content.firstChild),i}return null}transformTemplate(e,t){void 0===e._gatheredStyle&&(e._gatheredStyle=this.gatherStyles(e));const i=e._gatheredStyle;return i?this.transformStyle(i,t):null}transformStyle(e,t=""){let i=I(e);return this.transformRules(i,t),e.textContent=N(i),i}transformCustomStyle(e){let t=I(e);return M(t,e=>{":root"===e.selector&&(e.selector="html"),this.transformRule(e)}),e.textContent=N(t),t}transformRules(e,t){this._currentElement=t,M(e,e=>{this.transformRule(e)}),this._currentElement=null}transformRule(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}transformCssText(e,t){return e=e.replace(S,(e,i,n,r)=>this._produceCssProperties(e,i,n,r,t)),this._consumeCssProperties(e,t)}_getInitialValueForProperty(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}_fallbacksFromPreviousRules(e){let t=e;for(;t.parent;)t=t.parent;const i={};let n=!1;return M(t,t=>{n=n||t===e,n||t.selector===e.selector&&Object.assign(i,this._cssTextToMap(t.parsedCssText))}),i}_consumeCssProperties(e,t){let i=null;for(;i=x.exec(e);){let n=i[0],r=i[1],s=i.index,o=s+n.indexOf("@apply"),a=s+n.length,l=e.slice(0,o),c=e.slice(a),d=t?this._fallbacksFromPreviousRules(t):{};Object.assign(d,this._cssTextToMap(l));let h=this._atApplyToCssProperties(r,d);e=`${l}${h}${c}`,x.lastIndex=s+h.length}return e}_atApplyToCssProperties(e,t){e=e.replace(Y,"");let i=[],n=this._map.get(e);if(n||(this._map.set(e,{}),n=this._map.get(e)),n){let r,s,o;this._currentElement&&(n.dependants[this._currentElement]=!0);const a=n.properties;for(r in a)o=t&&t[r],s=[r,": var(",e,X,r],o&&s.push(",",o.replace(J,"")),s.push(")"),J.test(a[r])&&s.push(" !important"),i.push(s.join(""))}return i.join("; ")}_replaceInitialOrInherit(e,t){let i=V.exec(t);return i&&(t=i[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let i,n,r=e.split(";"),s={};for(let e,o,a=0;a<r.length;a++)e=r[a],e&&(o=e.split(":"),o.length>1&&(i=o[0].trim(),n=o.slice(1).join(":"),t&&(n=this._replaceInitialOrInherit(i,n)),s[i]=n));return s}_invalidateMixinEntry(e){if(G)for(let t in e.dependants)t!==this._currentElement&&G(t)}_produceCssProperties(e,t,i,n,r){if(i&&R(i,(e,t)=>{t&&this._map.get(t)&&(n=`@apply ${t};`)}),!n)return e;let s=this._consumeCssProperties(""+n,r),o=e.slice(0,e.indexOf("--")),a=this._cssTextToMap(s,!0),l=a,c=this._map.get(t),d=c&&c.properties;d?l=Object.assign(Object.create(d),a):this._map.set(t,l);let h,p,u=[],_=!1;for(h in l)p=a[h],void 0===p&&(p="initial"),d&&!(h in d)&&(_=!0),u.push(`${t}${X}${h}: ${p}`);return _&&this._invalidateMixinEntry(c),c&&(c.properties=l),i&&(o=`${e};${o}`),`${o}${u.join("; ")};`}}Z.prototype.detectMixin=Z.prototype.detectMixin,Z.prototype.transformStyle=Z.prototype.transformStyle,Z.prototype.transformCustomStyle=Z.prototype.transformCustomStyle,Z.prototype.transformRules=Z.prototype.transformRules,Z.prototype.transformRule=Z.prototype.transformRule,Z.prototype.transformTemplate=Z.prototype.transformTemplate,Z.prototype._separator=X,Object.defineProperty(Z.prototype,"invalidCallback",{get:()=>G,set(e){G=e}}); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const Q={},ee="_applyShimCurrentVersion",te="_applyShimNextVersion",ie="_applyShimValidatingVersion",ne=Promise.resolve(); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */function re(e){let t=Q[e];t&&se(t)}function se(e){e[ee]=e[ee]||0,e[ie]=e[ie]||0,e[te]=(e[te]||0)+1}function oe(e){return e[ee]===e[te]}function ae(e){return!oe(e)&&e[ie]===e[te]}function le(e){e[ie]=e[te],e._validating||(e._validating=!0,ne.then((function(){e[ee]=e[te],e._validating=!1})))} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let ce,de=null,he=window.HTMLImports&&window.HTMLImports.whenReady||null;function pe(e){requestAnimationFrame((function(){he?he(e):(de||(de=new Promise(e=>{ce=e}),"complete"===document.readyState?ce():document.addEventListener("readystatechange",()=>{"complete"===document.readyState&&ce()})),de.then((function(){e&&e()})))}))} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const ue="__seenByShadyCSS",_e="__shadyCSSCachedStyle";let fe=null,me=null;class ye{constructor(){this.customStyles=[],this.enqueued=!1,pe(()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}enqueueDocumentValidation(){!this.enqueued&&me&&(this.enqueued=!0,pe(me))}addCustomStyle(e){e[ue]||(e[ue]=!0,this.customStyles.push(e),this.enqueueDocumentValidation())}getStyleForCustomStyle(e){if(e[_e])return e[_e];let t;return t=e.getStyle?e.getStyle():e,t}processStyles(){const e=this.customStyles;for(let t=0;t<e.length;t++){const i=e[t];if(i[_e])continue;const n=this.getStyleForCustomStyle(i);if(n){const e=n.__appliedElement||n;fe&&fe(e),i[_e]=e}}return e}}ye.prototype.addCustomStyle=ye.prototype.addCustomStyle,ye.prototype.getStyleForCustomStyle=ye.prototype.getStyleForCustomStyle,ye.prototype.processStyles=ye.prototype.processStyles,Object.defineProperties(ye.prototype,{transformCallback:{get:()=>fe,set(e){fe=e}},validateCallback:{get:()=>me,set(e){let t=!1;me||(t=!0),me=e,t&&this.enqueueDocumentValidation()}}}); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const ge=new Z;class be{constructor(){this.customStyleInterface=null,ge.invalidCallback=re}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{ge.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()})})}prepareTemplate(e,t){if(this.ensure(),z(e))return;Q[t]=e;let i=ge.transformTemplate(e,t);e._styleAst=i}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t<e.length;t++){let i=e[t],n=this.customStyleInterface.getStyleForCustomStyle(i);n&&ge.transformCustomStyle(n)}this.customStyleInterface.enqueued=!1}}styleSubtree(e,t){if(this.ensure(),t&&K(e,t),e.shadowRoot){this.styleElement(e);let t=e.shadowRoot.children||e.shadowRoot.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}else{let t=e.children||e.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}}styleElement(e){this.ensure();let{is:t}=L(e),i=Q[t];if((!i||!z(i))&&i&&!oe(i)){ae(i)||(this.prepareTemplate(i,t),le(i));let n=e.shadowRoot;if(n){let e=n.querySelector("style");e&&(e.__cssRules=i._styleAst,e.textContent=N(i._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const t=new be;let n=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(e,i,n){t.flushCustomStyles(),t.prepareTemplate(e,i)},prepareTemplateStyles(e,t,i){window.ShadyCSS.prepareTemplate(e,t,i)},prepareTemplateDom(e,t){},styleSubtree(e,i){t.flushCustomStyles(),t.styleSubtree(e,i)},styleElement(e){t.flushCustomStyles(),t.styleElement(e)},styleDocument(e){t.flushCustomStyles(),t.styleDocument(e)},getComputedStyleValue:(e,t)=>q(e,t),flushCustomStyles(){t.flushCustomStyles()},nativeCss:s,nativeShadow:e,cssBuild:i,disableRuntime:r},n&&(window.ShadyCSS.CustomStyleInterface=n)}window.ShadyCSS.ApplyShim=ge, /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ window.JSCompiler_renameProperty=function(e,t){return e}; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ let ve,we,Ce=/(url\()([^)]*)(\))/g,Pe=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Se(e,t){if(e&&Pe.test(e))return e;if("//"===e)return e;if(void 0===ve){ve=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",ve="http://a/c%20d"===e.href}catch(e){}}if(t||(t=document.baseURI||window.location.href),ve)try{return new URL(e,t).href}catch(t){return e}return we||(we=document.implementation.createHTMLDocument("temp"),we.base=we.createElement("base"),we.head.appendChild(we.base),we.anchor=we.createElement("a"),we.body.appendChild(we.anchor)),we.base.href=t,we.anchor.href=e,we.anchor.href||e}function xe(e,t){return e.replace(Ce,(function(e,i,n,r){return i+"'"+Se(n.replace(/["']/g,""),t)+"'"+r}))}function ke(e){return e.substring(0,e.lastIndexOf("/")+1)} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const Ee=!window.ShadyDOM||!window.ShadyDOM.inUse,Ae=(Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),Ee&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const e=new CSSStyleSheet;e.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})());let Te=window.Polymer&&window.Polymer.rootPath||ke(document.baseURI||window.location.href),Oe=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Ne=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,Ie=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Me=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,De=window.Polymer&&window.Polymer.legacyOptimizations||!1,Re=window.Polymer&&window.Polymer.legacyWarnings||!1,Le=window.Polymer&&window.Polymer.syncInitialRender||!1,Fe=window.Polymer&&window.Polymer.legacyUndefined||!1,Be=window.Polymer&&window.Polymer.orderedComputed||!1,He=window.Polymer&&window.Polymer.removeNestedTemplates||!1,ze=window.Polymer&&window.Polymer.fastDomIf||!1,je=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Ue=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,Ke=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,qe=0;const $e=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let i=qe++;function n(n){let r=n.__mixinSet;if(r&&r[i])return n;let s=t,o=s.get(n);if(!o){o=e(n),s.set(n,o);let t=Object.create(o.__mixinSet||r||null);t[i]=!0,o.__mixinSet=t}return o}return n}; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let Ye={},Ve={};function Je(e,t){Ye[e]=Ve[e.toLowerCase()]=t}function Xe(e){return Ye[e]||Ve[e.toLowerCase()]}function We(e){e.querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}class Ge extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let i=Xe(e);return i&&t?i.querySelector(t):i}return null}attributeChangedCallback(e,t,i,n){t!==i&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=Se(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=ke(t)}return this.__assetpath}register(e){if(e=e||this.id){if(Ie&&void 0!==Xe(e))throw Je(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,Je(e,this),We(this)}}}Ge.prototype.modules=Ye,customElements.define("dom-module",Ge); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const Ze="link[rel=import][type~=css]",Qe="include",et="shady-unscoped";function tt(e){return Ge.import(e)}function it(e){const t=xe((e.body?e.body:e).textContent,e.baseURI),i=document.createElement("style");return i.textContent=t,i}function nt(e){const t=e.trim().split(/\s+/),i=[];for(let e=0;e<t.length;e++)i.push(...rt(t[e]));return i}function rt(e){const t=tt(e);if(!t)return console.warn("Could not find style data in module named",e),[];if(void 0===t._styles){const e=[];e.push(...at(t));const i=t.querySelector("template");i&&e.push(...st(i,t.assetpath)),t._styles=e}return t._styles}function st(e,t){if(!e._styles){const i=[],n=e.content.querySelectorAll("style");for(let e=0;e<n.length;e++){let r=n[e],s=r.getAttribute(Qe);s&&i.push(...nt(s).filter((function(e,t,i){return i.indexOf(e)===t}))),t&&(r.textContent=xe(r.textContent,t)),i.push(r)}e._styles=i}return e._styles}function ot(e){let t=tt(e);return t?at(t):[]}function at(e){const t=[],i=e.querySelectorAll(Ze);for(let e=0;e<i.length;e++){let n=i[e];if(n.import){const e=n.import,i=n.hasAttribute(et);if(i&&!e._unscopedStyle){const t=it(e);t.setAttribute(et,""),e._unscopedStyle=t}else e._style||(e._style=it(e));t.push(i?e._unscopedStyle:e._style)}}return t}function lt(e){let t=e.trim().split(/\s+/),i="";for(let e=0;e<t.length;e++)i+=ct(t[e]);return i}function ct(e){let t=tt(e);if(t&&void 0===t._cssText){let e=ht(t),i=t.querySelector("template");i&&(e+=dt(i,t.assetpath)),t._cssText=e||null}return t||console.warn("Could not find style data in module named",e),t&&t._cssText||""}function dt(e,t){let i="";const n=st(e,t);for(let e=0;e<n.length;e++){let t=n[e];t.parentNode&&t.parentNode.removeChild(t),i+=t.textContent}return i}function ht(e){let t="",i=at(e);for(let e=0;e<i.length;e++)t+=i[e].textContent;return t} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const pt=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */;function ut(e){return e.indexOf(".")>=0}function _t(e){let t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function ft(e,t){return 0===e.indexOf(t+".")}function mt(e,t){return 0===t.indexOf(e+".")}function yt(e,t,i){return t+i.slice(e.length)}function gt(e,t){return e===t||ft(e,t)||mt(e,t)}function bt(e){if(Array.isArray(e)){let t=[];for(let i=0;i<e.length;i++){let n=e[i].toString().split(".");for(let e=0;e<n.length;e++)t.push(n[e])}return t.join(".")}return e}function vt(e){return Array.isArray(e)?bt(e).split("."):e.toString().split(".")}function wt(e,t,i){let n=e,r=vt(t);for(let e=0;e<r.length;e++){if(!n)return;n=n[r[e]]}return i&&(i.path=r.join(".")),n}function Ct(e,t,i){let n=e,r=vt(t),s=r[r.length-1];if(r.length>1){for(let e=0;e<r.length-1;e++){if(n=n[r[e]],!n)return}n[s]=i}else n[t]=i;return r.join(".")} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const Pt={},St=/-[a-z]/g,xt=/([A-Z])/g;function kt(e){return Pt[e]||(Pt[e]=e.indexOf("-")<0?e:e.replace(St,e=>e[1].toUpperCase()))}function Et(e){return Pt[e]||(Pt[e]=e.replace(xt,"-$1").toLowerCase())} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let At=0,Tt=0,Ot=[],Nt=0,It=!1,Mt=document.createTextNode("");function Dt(){It=!1;const e=Ot.length;for(let t=0;t<e;t++){let e=Ot[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}Ot.splice(0,e),Tt+=e}new window.MutationObserver(Dt).observe(Mt,{characterData:!0});const Rt={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},Lt={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},Ft={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},Bt={run:e=>(It||(It=!0,Mt.textContent=Nt++),Ot.push(e),At++),cancel(e){const t=e-Tt;if(t>=0){if(!Ot[t])throw new Error("invalid async handle: "+e);Ot[t]=null}}},Ht=Bt,zt=$e(e=>{class t extends e{static createProperties(e){const t=this.prototype;for(let i in e)i in t||t._createPropertyAccessor(i)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!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 e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,i){let n=this.__data[e],r=this._shouldPropertyChange(e,t,n);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=n),this.__data[e]=t,this.__dataPending[e]=t),r}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ht.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 e=this.__data,t=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(e,t,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,i)),this.__dataCounter--}_shouldPropertiesChange(e,t,i){return Boolean(t)}_propertiesChanged(e,t,i){}_shouldPropertyChange(e,t,i){return i!==t&&(i==i||t==t)}attributeChangedCallback(e,t,i,n){t!==i&&this._attributeToProperty(e,i),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,i,n)}_attributeToProperty(e,t,i){if(!this.__serializing){const n=this.__dataAttributes,r=n&&n[e]||e;this[r]=this._deserializeValue(t,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(e,t,i){this.__serializing=!0,i=arguments.length<3?this[e]:i,this._valueToNodeAttribute(this,i,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,i){const n=this._serializeValue(t);"class"!==i&&"name"!==i&&"slot"!==i||(e=pt(e)),void 0===n?e.removeAttribute(i):e.setAttribute(i,""===n&&window.trustedTypes?window.trustedTypes.emptyScript:n)}_serializeValue(e){switch(typeof e){case"boolean":return e?"":void 0;default:return null!=e?e.toString():void 0}}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}}return t}),jt={};let Ut=HTMLElement.prototype;for(;Ut;){let e=Object.getOwnPropertyNames(Ut);for(let t=0;t<e.length;t++)jt[e[t]]=!0;Ut=Object.getPrototypeOf(Ut)}const Kt=window.trustedTypes?e=>trustedTypes.isHTML(e)||trustedTypes.isScript(e)||trustedTypes.isScriptURL(e):()=>!1;function qt(e,t){if(!jt[t]){let i=e[t];void 0!==i&&(e.__data?e._setPendingProperty(t,i):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=i))}}const $t=$e(e=>{const t=zt(e);class i extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;t<e.length;t++)this.prototype._createPropertyAccessor(kt(e[t]))}static attributeNameForProperty(e){return Et(e)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(e){for(let t in e)this._setProperty(t,e[t])}_ensureAttribute(e,t){const i=this;i.hasAttribute(e)||this._valueToNodeAttribute(i,t,e)}_serializeValue(e){switch(typeof e){case"object":if(e instanceof Date)return e.toString();if(e){if(Kt(e))return e;try{return JSON.stringify(e)}catch(e){return""}}default:return super._serializeValue(e)}}_deserializeValue(e,t){let i;switch(t){case Object:try{i=JSON.parse(e)}catch(t){i=e}break;case Array:try{i=JSON.parse(e)}catch(t){i=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: "+e)}break;case Date:i=isNaN(e)?String(e):Number(e),i=new Date(i);break;default:i=super._deserializeValue(e,t)}return i}_definePropertyAccessor(e,t){qt(this,e),super._definePropertyAccessor(e,t)}_hasAccessor(e){return this.__dataHasAccessor&&this.__dataHasAccessor[e]}_isPropertyPending(e){return Boolean(this.__dataPending&&e in this.__dataPending)}}return i}),Yt={"dom-if":!0,"dom-repeat":!0}; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let Vt=!1,Jt=!1;function Xt(){if(!Vt){Vt=!0;const e=document.createElement("textarea");e.placeholder="a",Jt=e.placeholder===e.textContent}return Jt}function Wt(e){Xt()&&"textarea"===e.localName&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}const Gt=(()=>{const e=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(t,i,n)=>{const r=i.getAttribute(n);e&&n.startsWith("on-")?t.setAttribute(n,e.createScript(r,n)):t.setAttribute(n,r)}})();function Zt(e){let t=e.getAttribute("is");if(t&&Yt[t]){let i=e;for(i.removeAttribute("is"),e=i.ownerDocument.createElement(t),i.parentNode.replaceChild(e,i),e.appendChild(i);i.attributes.length;){const{name:t}=i.attributes[0];Gt(e,i,t),i.removeAttribute(t)}}return e}function Qt(e,t){let i=t.parentInfo&&Qt(e,t.parentInfo);if(!i)return e;for(let e=i.firstChild,n=0;e;e=e.nextSibling)if(t.parentIndex===n++)return e}function ei(e,t,i,n){n.id&&(t[n.id]=i)}function ti(e,t,i){if(i.events&&i.events.length)for(let n,r=0,s=i.events;r<s.length&&(n=s[r]);r++)e._addMethodEventListenerToNode(t,n.name,n.value,e)}function ii(e,t,i,n){i.templateInfo&&(t._templateInfo=i.templateInfo,t._parentTemplateInfo=n)}function ni(e,t,i){return e=e._methodHost||e,function(t){e[i]?e[i](t,t.detail):console.warn("listener method `"+i+"` not defined")}}const ri=$e(e=>{class t extends e{static _parseTemplate(e,t){if(!e._templateInfo){let i=e._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(t),i.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute&&e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,i,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,i){return this._parseTemplateNode(e.content,t,i)}static _parseTemplateNode(e,t,i){let n=!1,r=e;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(t.hasInsertionPoint=!0):n=this._parseTemplateNestedTemplate(r,t,i)||n,Wt(r),r.firstChild&&this._parseTemplateChildNodes(r,t,i),r.hasAttributes&&r.hasAttributes()&&(n=this._parseTemplateNodeAttributes(r,t,i)||n),n||i.noted}static _parseTemplateChildNodes(e,t,i){if("script"!==e.localName&&"style"!==e.localName)for(let n,r=e.firstChild,s=0;r;r=n){if("template"==r.localName&&(r=Zt(r)),n=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=n;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,n=i.nextSibling,e.removeChild(i),i=n;if(t.stripWhiteSpace&&!r.textContent.trim()){e.removeChild(r);continue}}let o={parentIndex:s,parentInfo:i};this._parseTemplateNode(r,t,o)&&(o.infoIndex=t.nodeInfoList.push(o)-1),r.parentNode&&s++}}static _parseTemplateNestedTemplate(e,t,i){let n=e,r=this._parseTemplate(n,t);return(r.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(e,t,i){let n=!1,r=Array.from(e.attributes);for(let s,o=r.length-1;s=r[o];o--)n=this._parseTemplateNodeAttribute(e,t,i,s.name,s.value)||n;return n}static _parseTemplateNodeAttribute(e,t,i,n,r){return"on-"===n.slice(0,3)?(e.removeAttribute(n),i.events=i.events||[],i.events.push({name:n.slice(3),value:r}),!0):"id"===n&&(i.id=r,!0)}static _contentForTemplate(e){let t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,t){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);let i=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,n=t.content||e.content,r=document.importNode(n,!0);r.__noInsertionPoint=!t.hasInsertionPoint;let s=r.nodeList=new Array(i.length);r.$={};for(let e,n=0,o=i.length;n<o&&(e=i[n]);n++){let i=s[n]=Qt(r,e);ei(this,r.$,i,e),ii(this,i,e,t),ti(this,i,e)}return r=r,r}_addMethodEventListenerToNode(e,t,i,n){let r=ni(n=n||e,t,i);return this._addEventListenerToNode(e,t,r),r}_addEventListenerToNode(e,t,i){e.addEventListener(t,i)}_removeEventListenerFromNode(e,t,i){e.removeEventListener(t,i)}}return t}); /** * @fileoverview * @suppress {checkPrototypalTypes} * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt The complete set of authors may be found * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by * Google as part of the polymer project is also subject to an additional IP * rights grant found at http://polymer.github.io/PATENTS.txt */let si=0;const oi=[],ai={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},li="__computeInfo",ci=/[A-Z]/;function di(e,t,i){let n=e[t];if(n){if(!e.hasOwnProperty(t)&&(n=e[t]=Object.create(e[t]),i))for(let e in n){let t=n[e],i=n[e]=Array(t.length);for(let e=0;e<t.length;e++)i[e]=t[e]}}else n=e[t]={};return n}function hi(e,t,i,n,r,s){if(t){let o=!1;const a=si++;for(let l in i){let c=t[r?_t(l):l];if(c)for(let t,d=0,h=c.length;d<h&&(t=c[d]);d++)t.info&&t.info.lastRun===a||r&&!ui(l,t.trigger)||(t.info&&(t.info.lastRun=a),t.fn(e,l,i,n,t.info,r,s),o=!0)}return o}return!1}function pi(e,t,i,n,r,s,o,a){let l=!1,c=t[o?_t(n):n];if(c)for(let t,d=0,h=c.length;d<h&&(t=c[d]);d++)t.info&&t.info.lastRun===i||o&&!ui(n,t.trigger)||(t.info&&(t.info.lastRun=i),t.fn(e,n,r,s,t.info,o,a),l=!0);return l}function ui(e,t){if(t){let i=t.name;return i==e||!(!t.structured||!ft(i,e))||!(!t.wildcard||!mt(i,e))}return!0}function _i(e,t,i,n,r){let s="string"==typeof r.method?e[r.method]:r.method,o=r.property;s?s.call(e,e.__data[o],n[o]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function fi(e,t,i,n,r){let s,o,a=e[ai.NOTIFY],l=si++;for(let o in t)t[o]&&(a&&pi(e,a,l,o,i,n,r)||r&&mi(e,o,i))&&(s=!0);s&&(o=e.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}function mi(e,t,i){let n=_t(t);if(n!==t){return yi(e,Et(n)+"-changed",i[t],t),!0}return!1}function yi(e,t,i,n){let r={value:i,queueProperty:!0};n&&(r.path=n),pt(e).dispatchEvent(new CustomEvent(t,{detail:r}))}function gi(e,t,i,n,r,s){let o=(s?_t(t):t)!=t?t:null,a=o?wt(e,o):e.__data[t];o&&void 0===a&&(a=i[t]),yi(e,r.eventName,a,o)}function bi(e,t,i,n,r){let s,o=e.detail,a=o&&o.path;a?(n=yt(i,n,a),s=o&&o.value):s=e.currentTarget[i],s=r?!s:s,t[ai.READ_ONLY]&&t[ai.READ_ONLY][n]||!t._setPendingPropertyOrPath(n,s,!0,Boolean(a))||o&&o.queueProperty||t._invalidateProperties()}function vi(e,t,i,n,r){let s=e.__data[t];Oe&&(s=Oe(s,r.attrName,"attribute",e)),e._propertyToAttribute(t,r.attrName,s)}function wi(e,t,i,n){let r=e[ai.COMPUTE];if(r)if(Be){si++;const s=Si(e),o=[];for(let e in t)Pi(e,r,o,s,n);let a;for(;a=o.shift();)ki(e,"",t,i,a)&&Pi(a.methodInfo,r,o,s,n);Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let s=t;for(;hi(e,r,s,i,n);)Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),s=e.__dataPending,e.__dataPending=null}}const Ci=(e,t,i)=>{let n=0,r=t.length-1,s=-1;for(;n<=r;){const o=n+r>>1,a=i.get(t[o].methodInfo)-i.get(e.methodInfo);if(a<0)n=o+1;else{if(!(a>0)){s=o;break}r=o-1}}s<0&&(s=r+1),t.splice(s,0,e)},Pi=(e,t,i,n,r)=>{const s=t[r?_t(e):e];if(s)for(let t=0;t<s.length;t++){const o=s[t];o.info.lastRun===si||r&&!ui(e,o.trigger)||(o.info.lastRun=si,Ci(o.info,i,n))}};function Si(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;const i=e[ai.COMPUTE];let n,{counts:r,ready:s,total:o}=xi(e);for(;n=s.shift();){t.set(n,t.size);const e=i[n];e&&e.forEach(e=>{const t=e.info.methodInfo;--o,0==--r[t]&&s.push(t)})}if(0!==o){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}function xi(e){const t=e[li],i={},n=e[ai.COMPUTE],r=[];let s=0;for(let e in t){const n=t[e];s+=i[e]=n.args.filter(e=>!e.literal).length+(n.dynamicFn?1:0)}for(let e in n)t[e]||r.push(e);return{counts:i,ready:r,total:s}}function ki(e,t,i,n,r){let s=Bi(e,t,i,n,r);if(s===oi)return!1;let o=r.methodInfo;return e.__dataHasAccessor&&e.__dataHasAccessor[o]?e._setPendingProperty(o,s,!0):(e[o]=s,!1)}function Ei(e,t,i){let n=e.__dataLinkedPaths;if(n){let r;for(let s in n){let o=n[s];mt(s,t)?(r=yt(s,o,t),e._setPendingPropertyOrPath(r,i,!0,!0)):mt(o,t)&&(r=yt(o,s,t),e._setPendingPropertyOrPath(r,i,!0,!0))}}}function Ai(e,t,i,n,r,s,o){i.bindings=i.bindings||[];let a={kind:n,target:r,parts:s,literal:o,isCompound:1!==s.length};if(i.bindings.push(a),Mi(a)){let{event:e,negate:t}=a.parts[0];a.listenerEvent=e||Et(r)+"-changed",a.listenerNegate=t}let l=t.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let n=a.parts[i];n.compoundIndex=i,Ti(e,t,a,n,l)}}function Ti(e,t,i,n,r){if(!n.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let s=n.dependencies,o={index:r,binding:i,part:n,evaluator:e};for(let i=0;i<s.length;i++){let n=s[i];"string"==typeof n&&(n=Yi(n),n.wildcard=!0),e._addTemplatePropertyEffect(t,n.rootProperty,{fn:Oi,info:o,trigger:n})}}}function Oi(e,t,i,n,r,s,o){let a=o[r.index],l=r.binding,c=r.part;if(s&&c.source&&t.length>c.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let n=i[t];t=yt(c.source,l.target,t),a._setPendingPropertyOrPath(t,n,!1,!0)&&e._enqueueClient(a)}else{let o=r.evaluator._evaluateBinding(e,c,t,i,n,s);o!==oi&&Ni(e,a,l,c,o)}}function Ni(e,t,i,n,r){if(r=Ii(t,r,i,n),Oe&&(r=Oe(r,i.target,i.kind,t)),"attribute"==i.kind)e._valueToNodeAttribute(t,r,i.target);else{let n=i.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[n]?t[ai.READ_ONLY]&&t[ai.READ_ONLY][n]||t._setPendingProperty(n,r)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,n,r)}}function Ii(e,t,i,n){if(i.isCompound){let r=e.__dataCompoundStorage[i.target];r[n.compoundIndex]=t,t=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t)),t}function Mi(e){return Boolean(e.target)&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode}function Di(e,t){let{nodeList:i,nodeInfoList:n}=t;if(n.length)for(let t=0;t<n.length;t++){let r=n[t],s=i[t],o=r.bindings;if(o)for(let t=0;t<o.length;t++){let i=o[t];Ri(s,i),Li(s,e,i)}s.__dataHost=e}}function Ri(e,t){if(t.isCompound){let i=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),n=t.parts,r=new Array(n.length);for(let e=0;e<n.length;e++)r[e]=n[e].literal;let s=t.target;i[s]=r,t.literal&&"property"==t.kind&&("className"===s&&(e=pt(e)),e[s]=t.literal)}}function Li(e,t,i){if(i.listenerEvent){let n=i.parts[0];e.addEventListener(i.listenerEvent,(function(e){bi(e,t,i.target,n.source,n.negate)}))}}function Fi(e,t,i,n,r,s){s=t.static||s&&("object"!=typeof s||s[t.methodName]);let o={methodName:t.methodName,args:t.args,methodInfo:r,dynamicFn:s};for(let r,s=0;s<t.args.length&&(r=t.args[s]);s++)r.literal||e._addPropertyEffect(r.rootProperty,i,{fn:n,info:o,trigger:r});return s&&e._addPropertyEffect(t.methodName,i,{fn:n,info:o}),o}function Bi(e,t,i,n,r){let s=e._methodHost||e,o=s[r.methodName];if(o){let n=e._marshalArgs(r.args,t,i);return n===oi?oi:o.apply(s,n)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const Hi=[],zi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",ji="(?:("+zi+"|"+"(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)"+"|"+("(?:"+"(?:'(?:[^'\\\\]|\\\\.)*')"+"|"+'(?:"(?:[^"\\\\]|\\\\.)*")'+")")+")\\s*)",Ui=new RegExp("(\\[\\[|{{)\\s*"+"(?:(!)\\s*)?"+("("+zi+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+ji+"(?:,\\s*"+ji+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function Ki(e){let t="";for(let i=0;i<e.length;i++){t+=e[i].literal||""}return t}function qi(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let e={methodName:t[1],static:!0,args:Hi};if(t[2].trim()){return $i(t[2].replace(/\\,/g,"&comma;").split(","),e)}return e}return null}function $i(e,t){return t.args=e.map((function(e){let i=Yi(e);return i.literal||(t.static=!1),i}),this),t}function Yi(e){let t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:t,value:"",literal:!1},n=t[0];switch("-"===n&&(n=t[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.rootProperty=_t(t),i.structured=ut(t),i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i}function Vi(e,t,i){let n=wt(e,i);return void 0===n&&(n=t[i]),n}function Ji(e,t,i,n){const r={indexSplices:n};Fe&&!e._overrideLegacyUndefined&&(t.splices=r),e.notifyPath(i+".splices",r),e.notifyPath(i+".length",t.length),Fe&&!e._overrideLegacyUndefined&&(r.indexSplices=[])}function Xi(e,t,i,n,r,s){Ji(e,t,i,[{index:n,addedCount:r,removed:s,object:t,type:"splice"}])}function Wi(e){return e[0].toUpperCase()+e.substring(1)}const Gi=$e(e=>{const t=ri($t(e));class i extends t{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 ai}_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}_register