@webqit/oohtml 1.8.34 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/html-imports.js +1 -1
- package/dist/html-imports.js.gz +0 -0
- package/dist/html-imports.js.map +1 -1
- package/dist/html-imports.js.map.gz +0 -0
- package/dist/html-modules.js +1 -1
- package/dist/html-modules.js.gz +0 -0
- package/dist/html-modules.js.map +1 -1
- package/dist/html-modules.js.map.gz +0 -0
- package/dist/main.js +1 -1
- package/dist/main.js.gz +0 -0
- package/dist/main.js.map +1 -1
- package/dist/main.js.map.gz +0 -0
- package/dist/namespaced-html.js +1 -1
- package/dist/namespaced-html.js.gz +0 -0
- package/dist/namespaced-html.js.map +1 -1
- package/dist/namespaced-html.js.map.gz +0 -0
- package/dist/state-api.js +1 -1
- package/dist/state-api.js.gz +0 -0
- package/dist/state-api.js.map +1 -1
- package/dist/state-api.js.map.gz +0 -0
- package/dist/subscript.js +1 -1
- package/dist/subscript.js.gz +0 -0
- package/dist/subscript.js.map +1 -1
- package/dist/subscript.js.map.gz +0 -0
- package/package.json +8 -6
- package/src/subscript/Element.js +115 -0
- package/src/subscript/browser-entry.js +1 -1
- package/src/subscript/index.js +33 -494
- package/webpack.config.cjs +2 -3
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ Taking things further, template elements may reference remote content using the
|
|
|
95
95
|
|
|
96
96
|
The contents of the remote file automatically become the template's content on load.
|
|
97
97
|
|
|
98
|
-
**Details are in the [HTML Modules](https://webqit.io/tooling/
|
|
98
|
+
**Details are in the [HTML Modules](https://webqit.io/tooling/oohtml/docs/spec/html-modules) specification. Learn more about the convention, API, events, and the polyfill support.**
|
|
99
99
|
|
|
100
100
|
## HTML Imports
|
|
101
101
|
|
|
@@ -158,7 +158,7 @@ document.querySelector('div[template="module1"]').setAttribute('template', 'modu
|
|
|
158
158
|
|
|
159
159
|
This opens up new simple ways to create very dynamic applications.
|
|
160
160
|
|
|
161
|
-
**Details are in the [HTML Imports](https://webqit.io/tooling/
|
|
161
|
+
**Details are in the [HTML Imports](https://webqit.io/tooling/oohtml/docs/spec/html-imports) specification. Learn more about the convention, dynamicity, Slot Inheritance, isomorphic rendering, and the polyfill support.**
|
|
162
162
|
|
|
163
163
|
## Namespaced HTML
|
|
164
164
|
|
|
@@ -209,7 +209,7 @@ We get a document structure that translates to a bankable API for building great
|
|
|
209
209
|
|
|
210
210
|
> Much of our code in the examples below will now use the `namespace` attribute in markup and the `.namespace` property in JavaScript.
|
|
211
211
|
|
|
212
|
-
**Details are in the [Namespaced HTML](https://webqit.io/tooling/
|
|
212
|
+
**Details are in the [Namespaced HTML](https://webqit.io/tooling/oohtml/docs/spec/namespaced-html) specification. Learn more about the convention, Namespaced Selectors, API, observability, and the polyfill support.**
|
|
213
213
|
|
|
214
214
|
## The State API
|
|
215
215
|
|
|
@@ -282,7 +282,7 @@ Observer.observe(collapsible.state, 'collapsed', e => {
|
|
|
282
282
|
});
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
-
**Details are in the [State API](https://webqit.io/tooling/
|
|
285
|
+
**Details are in the [State API](https://webqit.io/tooling/oohtml/docs/spec/the-state-api) specification. Learn more about the API, deep observability, and the polyfill support.**
|
|
286
286
|
|
|
287
287
|
## Subscript
|
|
288
288
|
|
|
@@ -377,15 +377,15 @@ Leveraging this reactivity, we could reimplement the `<my-collapsible>` componen
|
|
|
377
377
|
</div>
|
|
378
378
|
```
|
|
379
379
|
|
|
380
|
-
**Details are in the [Subscript](https://webqit.io/tooling/
|
|
380
|
+
**Details are in the [Subscript](https://webqit.io/tooling/oohtml/docs/spec/subscript) specification. Learn more about the event-based runtime, deep observability, bindings, the API, error handling, and the polyfill support.**
|
|
381
381
|
|
|
382
382
|
## Getting Started
|
|
383
383
|
|
|
384
384
|
[Go to project homepage](https://webqit.io/tooling/oohtml).
|
|
385
385
|
|
|
386
|
-
You definitely want to visit the documentation for each of OOHTML's features and try everything out by pasting the code examples and running them right in your browser. Simply include the [OOHTML polyfill](https://webqit.io/tooling/
|
|
386
|
+
You definitely want to visit the documentation for each of OOHTML's features and try everything out by pasting the code examples and running them right in your browser. Simply include the [OOHTML polyfill](https://webqit.io/tooling/oohtml/docs/getting-started/polyfill) on your page and get away with writing modular, reusable, reactive HTML without a tool!
|
|
387
387
|
|
|
388
|
-
We're putting together a collection of examples in the [examples](https://webqit.io/tooling/
|
|
388
|
+
We're putting together a collection of examples in the [examples](https://webqit.io/tooling/oohtml/docs/learn/examples) section.
|
|
389
389
|
|
|
390
390
|
## Issues
|
|
391
391
|
|
package/dist/html-imports.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=77)}([function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return o.a})),n.d(e,"d",(function(){return c.a})),n.d(e,"e",(function(){return a.a})),n.d(e,"f",(function(){return u.a})),n.d(e,"g",(function(){return l.a})),n.d(e,"h",(function(){return r.a})),n.d(e,"i",(function(){return h.a})),n.d(e,"j",(function(){return f.a})),n.d(e,"k",(function(){return d.a}));var r=n(2),i=function(t){return typeof t};function s(t,...e){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var n,r,i=globalThis.WebQitInternalsRegistry.get(t);if(!i){if(i=new Map,!1===e[0])return i;globalThis.WebQitInternalsRegistry.set(t,i)}for(;n=e.shift();)if((r=i)&&!(i=i.get(n))){if(i=new Map,!1===e[0])return i;r.set(n,i)}return i}var o=n(1),c=(n(25),n(50)),a=(n(41),n(3)),u=(n(24),n(18)),l=n(10),h=(n(33),n(14)),f=(n(42),n(21),n(5)),d=n(6);n(7),n(9),n(20);new Map;n(19)},function(t,e,n){"use strict";e.a=function(t){return Array.isArray(t)}},function(t,e,n){"use strict";e.a=function(t){return!Array.isArray(t)&&"object"==typeof t&&t}},function(t,e,n){"use strict";var r=n(21);e.a=function(t){return Object(r.a)(t)||t&&"[object function]"==={}.toString.call(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o.a})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s.a})),n.d(e,"f",(function(){return u.a})),n.d(e,"g",(function(){return l.a})),n.d(e,"h",(function(){return a.a})),n.d(e,"i",(function(){return h.a})),n.d(e,"j",(function(){return f.a}));var r=n(36);var i=function(t,e){return t.reduce((t,n,r)=>t||e(n,r),!1)};n(32),n(22);n(6),n(3),n(28);var s=n(8),o=n(55);function c(t,e,n=null){return n||!1!==n&&t.dotSafe&&e.dotSafe?t.join(".")===e.join("."):t.length===e.length&&t.reduce((t,n,r)=>t&&n===e[r],!0)}var a=n(37),u=(n(16),n(29),n(1),n(2),n(25),n(18),n(52)),l=n(7);n(34),n(20),n(14);var h=n(48),f=n(47)},function(t,e,n){"use strict";var r=n(21);e.a=function(t){return Array.isArray(t)||"object"==typeof t&&t||Object(r.a)(t)}},function(t,e,n){"use strict";e.a=function(t){return arguments.length&&(void 0===t||void 0===t)}},function(t,e,n){"use strict";var r=n(16);e.a=function(t,e=1){return arguments.length>1?Object(r.a)(t.slice().reverse(),e).reverse():Object(r.a)(t.slice().reverse())}},function(t,e,n){"use strict";var r=n(1),i=n(42),s=n(41),o=n(2);e.a=function(t,e=!0){return Object(r.a)(t)?t:!e&&Object(o.a)(t)?[t]:!1!==t&&0!==t&&Object(s.a)(t)?[]:Object(i.a)(t)?Array.prototype.slice.call(t):Object(o.a)(t)?Object.values(t):[t]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(1),i=n(3),s=n(2),o=n(5),c=n(10),a=n(43);function u(t,e,n=!1,l=!1,h=!1){var f=0,d=t.shift();if((Object(c.a)(d)||!0===d||!1===d)&&(f=d,d=t.shift()),!t.length)throw new Error("_merge() requires two or more array/objects.");return t.forEach((t,b)=>{(Object(o.a)(t)||Object(i.a)(t))&&(n?Object(a.a)(t):Object.getOwnPropertyNames(t)).forEach(i=>{if(e(i,d,t,b)){var o=d[i],a=t[i];if((Object(r.a)(o)&&Object(r.a)(a)||Object(s.a)(o)&&Object(s.a)(a))&&(!0===f||f>0))d[i]=Object(r.a)(o)&&Object(r.a)(a)?[]:{},u([Object(c.a)(f)?f-1:f,d[i],o,a],e,n,l,h);else if(Object(r.a)(d)&&Object(r.a)(t))l?d[i]=a:d.push(a);else try{h?Object.defineProperty(d,i,Object.getOwnPropertyDescriptor(t,i)):d[i]=t[i]}catch(t){}}})}),d}},function(t,e,n){"use strict";var r=n(18);e.a=function(t){return Object(r.a)(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return i.a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return l.a}));n(17);var r=n(40);n(35),n(1),n(2),n(3);var i=n(20),s=(n(38),n(5)),o=n(8);n(16),n(14);var c=n(6),a=n(24),u=function(t,e,n={},r={}){e=Object(o.a)(e).slice();for(var i=t;!Object(c.a)(i)&&!Object(a.a)(i)&&e.length;){var u=e.shift();if(!(n.get?n.get(i,u):Object(s.a)(i)?u in i:i[u]))return void(r.exists=!1);i=n.get?n.get(i,u):i[u]}return r.exists=!0,i};n(43),n(44),n(9),n(7);var l=n(19);n(34),n(10)},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(14),i=n(6),s=n(3),o=n(8),c=n(29),a=n(16),u=n(7),l=n(19),h=n(38),f=n(35);class d{static lex(t,e,n={}){if(!Object(r.a)(t+=""))throw new Error("Argument1 must be a string!");var i=t=>({delims:t.delims.slice(),options:Object(f.a)(t.options),nesting:t.nesting.slice(),maxDepth:t.maxDepth,comments:t.comments.slice(),tokens:t.tokens.slice(),matches:t.matches.slice(),matchesi:Object(f.a)(t.matchesi)});if(d.$cache[t]&&!1!==n.cache)for(var s=0;s<d.$cache[t].length;s++){var o=d.$cache[t][s];if(Object(h.a)(o.delims,e))return i(o)}var c=new d(t,n).lex(e);return!1!==n.cache&&(d.$cache[t]=d.$cache[t]||[],d.$cache[t].push(c)),i(c)}static split(t,e,n){return d.lex(t,e,n).tokens}static match(t,e,n){return d.lex(t,e,n).matches}constructor(t,e){if(!Object(r.a)(t))throw new Error("Lexer requires the first argument to be a string.");this.$str=t,this.$options=e||{},this.$options.blocks||(this.$options.blocks=d.$blocks),this.$options.quotes||(this.$options.quotes=d.$quotes),this.$options.comments||(this.$options.comments=d.$comments)}lex(t,e){for(var n={delims:Object(o.a)(t),options:Object(l.a)(!0,{},this.$options,e||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},r=0;"number"==typeof r;)r=this._evalCharsAt(n,r);if(n.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+Object(c.a)(n.nesting).join(", "));return n}_evalCharsAt(t,e){if(!(e>=this.$str.length)){var n=1,r={},i={},s={};if(t.openComment||(i=this._testQuotes(t,e)),t.openQuote||(r=this._testComments(t,e)),t.openComment||r.ending)if(t.nesting.length||s.ending)this._push(t,this.$str[e]);else n=(c=r.starting||r.ending||this.$str[e]).length,this._push(t,c,"comments",r.starting);else if(t.openQuote||i.ending)this._push(t,this.$str[e]);else{if(t.options.limit&&t.matches.length===t.options.limit)return this._push(t,this.$str[e]),e+1;s=this._testNesting(t,e);s=this._testNesting(t,e);var o=this._testChars(t.options.stopChars||[],t,e);if(!t.nesting.length&&!1!==o)return t.options.stopChar=o,void(t.options.stopCharForward=this.$str.substr(e));if(t.delims.length)if(t.nesting.length||s.ending){var c;n=(c=s.starting||s.ending||this.$str[e]).length,this._push(t,c)}else{this._push(t,"");var a=this._testChars(t.delims,t,e);if(!1!==a&&(t.matches.push(a),t.matchesi[e]=a,n=a.length||1,!t.options.preserveDelims)){var u=e+(a.length||1);return u===this.$str.length&&this._push(t,""),u}this._push(t,a||this.$str[e])}else 2===t.nesting.length&&s.starting?(t.matches.push(null),this._push(t,s.starting),n=s.starting.length):!t.nesting.length&&s.ending?(this._push(t,s.ending),n=s.ending.length,t.matches.push(null)):this._push(t,this.$str[e])}return e+n}}_testQuotes(t,e){var n={};return(t.options.quotes||[]).forEach(r=>{this.$str.substr(e,1)===r&&(t.openQuote?r===t.openQuote&&(t.openQuote=!1,n.ending=r):(t.openQuote=r,n.starting=r))}),n}_testComments(t,e){var n={};return(t.options.comments||[]).forEach(r=>{if(t.openComment){if(Object(u.a)(r)===Object(u.a)(t.openComment)){var i=Object(u.a)(r);this.$str.substr(e).startsWith(i)&&(t.openComment=!1,n.ending=i)}}else{var s=Object(a.a)(r);this.$str.substr(e).startsWith(s)&&(t.openComment=r,n.starting=s)}}),n}_testNesting(t,e){var n={};return(t.options.blocks||[]).forEach(r=>{var i=Object(a.a)(r);if(this.$str.substr(e).startsWith(i))t.nesting=t.nesting.concat([r]),n.starting=i;else if(t.nesting.length&&Object(u.a)(r)===Object(u.a)(Object(u.a)(t.nesting))){var s=Object(u.a)(r);this.$str.substr(e).startsWith(s)&&(t.nesting=t.nesting.slice(0,-1),n.ending=s)}}),t.maxDepth=Math.max(t.maxDepth,t.nesting.length),n}_testChars(t,e,n){for(var r=0;r<t.length;r++){var i=t[r];if(Object(s.a)(i)){var o=i(this.$str.substr(0,n),this.$str.substr(n),e.tokens.slice());if(!1!==o)return o}if(e.options.useRegex){var c=this.$str.substr(n).match(new RegExp("^"+i,!0!==e.options.useRegex?e.options.useRegex:""));if(c)return c[0]}if(!e.options.ci&&this.$str.substr(n,i.length)===i||e.options.ci&&this.$str.substr(n,i.length).toLowerCase()===i.toLowerCase())return i}return!1}_push(t,e,n="tokens",r=!1){var s=t.matches.length;if(Object(i.a)(t.tokens[s])&&(t.tokens[s]=""),"comments"===n){t.tokens[s].comments||(t.tokens[s]=new String(t.tokens[s]),t.tokens[s].comments=[]);var o=t.tokens[s].comments.length-(!t.tokens[s].comments.length||r?0:1);t.tokens[s].comments[o]=(t.tokens[s].comments[o]||"")+e}else{t.tokens[s].comments;t.tokens[s]=t.tokens[s]+e}}split(t,e,n){return this.lex(e,n).tokens}match(t,e,n){return this.lex(e,n).matches}regParse(t,e){return this.lex(t,Object(l.a)({useRegex:!0},e||{}))}regSplit(t,e){return this.regParse(t,e).tokens}regMatch(t,e){return this.regParse(t,e).matches}}d.$blocks=[["(",")"],["[","]"],["{","}"]],d.$quotes=['"',"'","`"],d.$comments=[["/*","*/"],["//","\n"]],d.$cache=Object.create(null)},function(t,e,n){"use strict";e.a=function(t){return t instanceof String||"string"==typeof t&&null!==t}},,function(t,e,n){"use strict";e.a=function(t,e=1){var n=0;t.forEach(t=>{n++});var r=t.slice(t.length-n,e);return arguments.length>1?r:r[0]}},function(t,e,n){"use strict";var r=n(1),i=n(2),s=n(5),o=n(25),c=n(20);e.a=function(t,e,n=!0,a=!0,u=!1,l=!1){if(Object(r.a)(t)&&Object(r.a)(e)){var h=[],f=!0;return t.forEach(t=>{if(f){var d=!1;Object(c.a)(e,(e,o)=>{(!d||a&&Object(s.a)(t))&&(d=n(t,o),(Object(r.a)(d)&&!d.length||Object(i.a)(d)&&!Object.keys(d).length)&&(d=!1),Object(s.a)(d)&&a&&(t=d))}),Object(s.a)(d)?h.push(a?d:t):Object(o.a)(d)?u&&!d||!u&&d?h.push(t):l&&(f=!1):h.push(d)}}),h}if(Object(i.a)(t)&&Object(i.a)(e)){h={},f=!0;return Object.keys(t).forEach(c=>{if(f){var d=n(t[c],e[c]);(Object(r.a)(d)&&!d.length||Object(i.a)(d)&&!Object.keys(d).length)&&(d=!1),Object(s.a)(d)?h[c]=a?d:t[c]:Object(o.a)(d)?u&&!d||!u&&d?h[c]=t[c]:l&&(f=!1):h[c]=d}}),h}}},function(t,e,n){"use strict";e.a=function(t){return t instanceof Number||"number"==typeof t}},function(t,e,n){"use strict";var r=n(9);e.a=function(...t){return Object(r.a)(t,(t,e,n)=>!0,!1,!1,!1)}},function(t,e,n){"use strict";var r=n(5),i=n(10);e.a=function(t,e){var n=void 0;return Object(r.a)(t)&&Object.keys(t).forEach((r,s)=>{!1!==n&&(n=e(Object(i.a)(r)?parseFloat(r):r,t[r],s))}),n}},function(t,e,n){"use strict";e.a=function(t){return"function"==typeof t}},function(t,e,n){"use strict";function r(t,e,n=null,r=!1){return e.length>t.length?-1:("number"==typeof n?r?t.slice(0,n+1+(n<0?t.length:0)):t.slice(n):t).reduce((t,n,i)=>{var[s,o,c]=t;if(!r&&s>-1)return[s,o,c];var a=c+1,u=n===e[a]?0===a?[i,0]:[o,a]:[-1,-1];return u[1]===e.length-1&&(u[1]=-1,u[0]>-1)?[u[0]].concat(u):[s].concat(u)},[-1,-1,-1])[0]+(r||"number"!=typeof n?0:n>-1?n:t.length-n)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";e.a=function(t,e,n=!1){if(""==e)return t;var r=n?t.lastIndexOf(e):t.indexOf(e);return-1===r?"":t.substr(r+e.length)}},function(t,e,n){"use strict";e.a=function(t){return null===t||""===t}},function(t,e,n){"use strict";e.a=function(t){return!0===t||!1===t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return i.a})),n.d(e,"c",(function(){return s.a})),n.d(e,"d",(function(){return o.a})),n.d(e,"e",(function(){return c.a}));var r=n(23),i=n(32),s=n(45),o=n(30),c=n(27)},function(t,e,n){"use strict";e.a=function(t,e,n){return t.startsWith(e)&&t.endsWith(n)}},function(t,e,n){"use strict";e.a=function(t,...e){return e.forEach(e=>{t.indexOf(e)<0&&t.push(e)}),t}},function(t,e,n){"use strict";var r=n(1),i=n(2),s=n(10);const o=function(t,e=1,n=!0){return!Object(s.a)(e)||e<=0?t:(!Object(r.a)(t)&&Object(i.a)(t)&&n&&(t=Object.values(t)),Object(r.a)(t)?t.reduce((t,s)=>Object(r.a)(s)||Object(i.a)(s)&&n?t.concat(o(Object(r.a)(s)?s:Object.values(s),e-1,n)):t.concat(s),[]):t)};e.a=o},function(t,e,n){"use strict";var r=n(23),i=n(45);e.a=function(t,e,n){return Object(i.a)(Object(r.a)(t,e),n)}},function(t,e,n){"use strict";var r=function(t){return!Array.isArray(t)&&"object"==typeof t&&t};var i=function(){if(!(r(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const t=r(this)&&this.window?this.window:window;if(t.WebQit||(t.WebQit={}),!t.WebQit.window){let e,n;Object.defineProperty(t.WebQit,"window",{get:()=>t}),Object.defineProperty(t.WebQit,"vendor",{value:{getName:()=>(e||(e=function(t){if(void 0!==t.InstallTrigger)return"firefox";if(/constructor/i.test(t.HTMLElement)||"[object SafariRemoteNotification]"===(!t.safari||void 0!==t.safari&&t.safari.pushNotification).toString())return"safari";var e=!(!t.chrome||!t.chrome.webstore&&!t.chrome.runtime),n=e&&-1!=t.navigator.userAgent.indexOf("Edg"),r=!!t.opr&&!!t.opr.addons||!!t.opera||t.navigator.userAgent.indexOf(" OPR/")>=0,i=!!t.document.documentMode,s=!i&&!!t.StyleMedia;return(e||r)&&t.CSS,s?"edge":i?"ie":r?"opera":n?"ie-chromium":e?"chrome":"unknown"}(t)),e),getPrefix:()=>(n||(n=function(t){var e=t.getComputedStyle(t.document.documentElement,""),n=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+n+")","i"))||[])[1],prefix:n,css:"-"+n+"-"}}(t)),n)}})}return t.WebQit},s=function(t){return"function"==typeof t},o=function(t){return Array.isArray(t)||"object"==typeof t&&t||s(t)},c=function(t){return function(t){return t instanceof Number||"number"==typeof t}(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)};class a{constructor(t,e=!0){this.window=t,this.async=e,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame(()=>{this.readCallbacks.forEach((t,e)=>{t&&!t()&&(this.readCallbacks[e]=null)}),this.writeCallbacks.forEach((t,e)=>{t&&!t()&&(this.writeCallbacks[e]=null)}),this._run()})}onread(t,e=!1){if(e)return new Promise((e,n)=>{!1===this.async?t(e,n):this.readCallbacks.push(()=>{t(e,n)})});!1===this.async?t():this.readCallbacks.push(t)}onwrite(t,e=!1){if(e)return new Promise((e,n)=>{!1===this.async?t(e,n):this.writeCallbacks.push(()=>{t(e,n)})});!1===this.async?t():this.writeCallbacks.push(t)}cycle(t,e,n){this.onread(()=>{var r=t(n);if(r){var i=r=>{this.onwrite(()=>{var i=e(r,n);if(i){var s=n=>{this.cycle(t,e,n)};i instanceof Promise?i.then(s):s()}})};r instanceof Promise?r.then(i):i()}})}}var u=function(t){return t instanceof String||"string"==typeof t&&null!==t},l=function(t){return Array.isArray(t)},h=function(t){return arguments.length&&(void 0===t||void 0===t)},f=function(t){return null===t||""===t},d=function(t,e=!0){return l(t)?t:!e&&r(t)?[t]:!1!==t&&0!==t&&function(t){return f(t)||h(t)||!1===t||0===t||o(t)&&!Object.keys(t).length}(t)?[]:function(t){return!u(t)&&!h(t.length)}(t)?Array.prototype.slice.call(t):r(t)?Object.values(t):[t]},b=function(t){const e=i.call(this);e.DOM.isDOMReady||"complete"===e.window.document.readyState?t(e.window):(e.window.domReadyCallbacks||(e.window.domReadyCallbacks=[],e.window.document.addEventListener("DOMContentLoaded",()=>{e.DOM.isDOMReady=!0,e.window.domReadyCallbacks.splice(0).forEach(t=>t(e.window))},!1)),e.window.domReadyCallbacks.push(t))};class m{constructor(t){this.window=t}onAdded(t,e,n={}){return n.on="added",this.onPresenceChange(t,(t,n,r,i,s)=>{e(t,n,r,i,s)},n)}onRemoved(t,e,n={}){return n.on="removed",this.onPresenceChange(t,(t,n,r,i,s)=>{e(t,n,r,i,s)},n)}onPresent(t,e,n={}){b.call(this.window,()=>{this.window.MutationObserver&&this.onAdded(t,(t,n)=>{t.forEach(t=>e(t,n))},n),u(t)?d(this.window.document.querySelectorAll(t)).forEach(t=>e(t,1)):t.parentNode&&e(t,1)})}onAbsent(t,e,n={}){b.call(this.window,()=>{this.window.MutationObserver&&onRemoved(t,(t,n)=>{t.forEach(t=>e(t,n))},n),u(t)?0===d(this.window.document.querySelectorAll(t)).length&&e(null,0):t.parentNode||e(t,0)})}onPresenceChange(t,e,n={}){t=d(t,!1);var r=(t,e)=>(e.$$searchCache||(e.$$searchCache=new Map),t.reduce((t,r)=>{var i;return e.$$searchCache.has(r)?i=e.$$searchCache.get(r):(i=((t,e)=>{if(e=e.filter(t=>t.matches),u(t)){var r=e.filter(e=>e.matches(t));if(!1!==n.observeIndirectMutation&&(r=e.reduce((e,n)=>e.concat(d(n.querySelectorAll(t))),r)).length)return r}else{if(e.includes(t))return[t];if(!1!==n.observeIndirectMutation&&e.length)for(var i=t;i=i.parentNode;)if(e.includes(i))return[t]}})(r,e,u(r))||[],e.$$searchCache.set(r,i)),t.concat(i)},[])),i=new Set,s=new Set,o=(o,c,a)=>{c&&"removed"===n.on||!c&&"added"===n.on||(o=r(t,o)).length&&(n.maintainCallState?(o.forEach(t=>{c?(i.add(t),s.delete(t)):(i.delete(t),s.add(t))}),e(o,c,a,i,s)):e(o,c,a))},c=n.context||this.window.document.documentElement;return this._observe(c,(t,e,r,i)=>{n.ignoreTransients||(o(t,0,!0),o(t.concat(e),1,!0),o(e,0,!0)),o(i,0),o(r,1)})}onAttrChange(t,e,n=[]){var r=new this.window.MutationObserver(e),i={attributes:!0,attributeOldValue:!0};return n&&(i.attributeFilter=n),r.observe(t,i),r}onTreeChange(t,e,n=!1){var r=new this.window.MutationObserver(e),i={childList:!0,subtree:n};return r.observe(t,i),r}onMutation(t,e,n){var r=new this.window.MutationObserver(e);return r.observe(t,n),r}_observe(t,e){if(!p.has(t)){const e=new Set,n=new this.window.MutationObserver(t=>{if(e.size){var n=t.reduce((t,e)=>t.concat(d(e.addedNodes)),[]),r=t.reduce((t,e)=>t.concat(d(e.removedNodes)),[]),i=[],s=[];n=new Set(n),r=new Set(r),n.forEach(t=>{r.has(t)&&(r.delete(t),n.delete(t),t.isConnected?i.push(t):s.push(t))}),n=[...n],r=[...r],e.forEach(t=>t(i,s,n,r))}});n.observe(t,{childList:!0,subtree:!0}),p.set(t,{callbacks:e,observer:n})}const n=p.get(t);return n.callbacks.add(e),{disconnect(){n.callbacks.delete(e)},reconnect(){n.callbacks.add(e)}}}}const p=new Map;var g=function(t){!function(t){t.CSS||(t.CSS={});t.CSS.escape||(t.CSS.escape=t=>t.replace(/([\:@\~\$\&])/g,"\\$1"))}(t),function(t){"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(t),function(t){t.Element.prototype.matches||(t.Element.prototype.matches=t.Element.prototype.matchesSelector||t.Element.prototype.mozMatchesSelector||t.Element.prototype.msMatchesSelector||t.Element.prototype.oMatchesSelector||t.Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1})}(t)};function O(t,e=null,n=!1){const r=i.call(this);if(u(t)){var s;if(t.trim().startsWith("<")){var o=r.window.document.createElement("div");o.innerHTML=t,s=n?d(o.children):o.firstChild}else s=n?d(w.call(this,t,e)):j.call(this,t,e);return s}return t instanceof r.window.Element?n?[t]:t:n?d(t):t}function v(t,e=null){return O.call(this,t,e,!0)}function j(t,e=null,n=!1){const r=i.call(this);e=e||r.window.document;var s,o=n?"querySelectorAll":"querySelector";try{s=e[o](t)}catch(n){try{s=e[o](t.replace(/\:is\(/g,":matches("))}catch(n){try{s=e[o](t.replace(/\:is\(/g,":-webkit-any("))}catch(n){try{s=e[o](t.replace(/\:is\(/g,":-moz-any("))}catch(t){throw t}}}}return s}function w(t,e=null){return j.call(this,t,e,!0)}var y=function(t){return s(t)||t&&"[object function]"==={}.toString.call(t)};var k=function(t,e,n={},r={}){e=d(e).slice();for(var i=t;!h(i)&&!f(i)&&e.length;){var s=e.shift();if(!(n.get?n.get(i,s):o(i)?s in i:i[s]))return void(r.exists=!1);i=n.get?n.get(i,s):i[s]}return r.exists=!0,i},E=function(t,e,n,r={},i={}){const s=(t,n,r)=>i.set?i.set(t,n,r):(c(e[u])&&l(t)?t.push(r):t[n]=r,!0);e=d(e);for(var a=t,u=0;u<e.length;u++){if(!(u<e.length-1))return s(a,e[u],n);if(!a||!o(a)&&!y(a))return!1;var h=k(a,e[u],i);if(!o(h)){if(!1===i.buildTree)return!1;if(h=y(i.buildTree)?i.buildTree(u):c(e[u+1])?[]:{},!s(a,e[u],h))return!1}a=h}},C=function(t,e,n=!1,r={}){e=d(e);var i=!1;do{var s=""===(s=e.pop())?0:s,c=t;e.length&&(c=k(t,e,{},r)),(o(c)||y(c))&&(r.has?r.has(c,s):s in c)&&(r.deleteProperty?i=r.deleteProperty(c,s):r.del?i=r.del(c,s):(delete c[s],i=!0))}while(i&&n&&e.length&&(o(c)||y(c))&&!(r.keys?r.keys(c):Object.keys(c)).length);return i},x=function(t,e,n={}){var r={};return k(t,e,n,r),r.exists};function S(t,e=!1){const n=i.call(this);var s={};return!(s.el=n.window.document.head.querySelector('meta[name="oohtml"]'))&&e&&(s.el=n.window.document.createElement("meta"),s.el.setAttribute("name",t),n.window.document.head.append(s.el)),s.el&&(s.vars=(s.el.getAttribute("content")||"").split(";").filter(t=>t).reduce((t,e)=>{var n=e.split("=").map(t=>t.trim());return E(t,n[0].split("."),"true"===n[1]||"false"!==n[1]&&(c(n[1])?parseInt(n[1]):n[1])),t},{})),s.get=function(t){return k(this.vars,t.split("."))},s.set=function(t,n=null,i=!1){var s=r(t)?t:{[t]:!0===n?"true":n};if(i=arguments.length<3?n:i,Object.keys(s).forEach(t=>{if(!1===s[t])C(this.vars,t.split("."));else if(r(s[t]))Object.keys(s[t]).forEach(e=>{var n=(t+"."+e).split(".");i&&x(this.vars,n)||E(this.vars,n,s[t][e])});else{var e=t.split(".");i&&x(this.vars,e)||E(this.vars,e,s[t])}}),e){const t=(e,n)=>Object.keys(n).reduce((i,s)=>{var o=(e?e+".":"")+s;return r(n[s])?i.push(...t(o,n[s])):i.push(o+"="+n[s]),i},[]);this.el.setAttribute("content",t("",this.vars).join(";"))}return!0},s.defaults=function(t,e=null){return this.set(t,e,!0)},s}e.a=function(){const t=i.call(this);return t.DOM||(t.DOM={},g(t.window),t.DOM.reflow=new a(t.window),t.DOM.mutations=new m(t.window),t.DOM.meta=S.bind(t.window),t.DOM.query=O.bind(t.window),t.DOM.queryAll=v.bind(t.window),t.DOM.ready=b.bind(t.window)),t}},function(t,e,n){"use strict";e.a=function(t,e,n=!1){if(""==e)return t;var r=n?t.lastIndexOf(e):t.indexOf(e);return-1===r?t:t.substr(0,r)}},function(t,e,n){"use strict";var r=n(2);e.a=function(t){return Object(r.a)(t)&&Object.getPrototypeOf(t)===Object.prototype}},function(t,e,n){"use strict";e.a=function(t,e=1){for(var n=[],r=null;n.length<e&&(r=t[Math.floor(Math.random()*t.length)])&&-1===n.indexOf(r);)n.push(r);return arguments.length>1?n:n[0]}},function(t,e,n){"use strict";var r=n(1),i=n(3),s=n(9);e.a=function(t,e=[]){return Object(s.a)([{},t],(t,n,s)=>{if(!Object(i.a)(s[t]))return Object(i.a)(e)?e(t):!Object(r.a)(e)||!e.length||e.indexOf(t)>-1},!1,!1,!1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n(23);var r=n(22);function i(t,e,n=null,i=!1){var s=Object(r.a)(t,e,n,i);return-1===s?[]:t.slice(s+e.length)}},function(t,e,n){"use strict";e.a=function(t,e,n=!1){for(var r=t.indexOf(e);r>-1&&(n||!1===n);)t.splice(r,1),n>0&&n--,r=t.indexOf(e);return t}},function(t,e,n){"use strict";var r=n(18),i=n(1),s=n(2),o=(n(5),n(3)),c=n(33),a=n(17);const u=function(t,e,n=!0,l=1){if(Object(i.a)(t)&&Object(i.a)(e)&&t.length!==e.length)return!n;if(Object(s.a)(t)&&Object(s.a)(e)){var h=Object.keys(t),f=Object.keys(e);if(!h.length&&!f.length)return Object(c.a)(t)&&Object(c.a)(e)?n:t===e===n;if(!u(h,f))return!n}if(l>0&&(Object(i.a)(t)&&Object(i.a)(e)||Object(s.a)(t)&&Object(s.a)(e))){var d=Object(a.a)(t,e,(t,e)=>u(t,e,n,l-1),!1,!1,!0);return Object(i.a)(d)?d.length===t.length&&d.length===e.length:Object(s.a)(d)&&Object(s.a)(t)?Object.keys(d).length===Object.keys(t).length&&Object.keys(d).length===Object.keys(e).length:d}return Object(o.a)(n)?n(t,e):Object(r.a)(t)&&Object(r.a)(e)&&isNaN(t)&&isNaN(e)?n:t===e===n};e.a=u},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return h}));var r=n(31),i=n(26),s=n(4),o=(n(0),n(12)),c=n(13);function a(t,e={}){const n=r.a.call(this);return n.OOHTML||(n.OOHTML={}),n.OOHTML.meta||(n.OOHTML.meta=n.DOM.meta("oohtml",!0)),n.OOHTML.meta.defaults(Object(o.d)(3,t,e)),n.OOHTML.meta}function u(t,e,n,r=null){var i=e.split("#")[0].split("/").map(t=>t.trim()).filter(t=>t);return b(t,i,n,r)}function l(t){var e=c.a.split(t.trim(),[":"]);return[t=e.shift(),e.reduce((t,e)=>{var[n,r]=c.a.split(e.trim(),[]);return t[n]=Object(i.d)(r,"(",")"),t},{})]}function h(t,e){return e=e.split("#")[0].split("/").map(t=>t.trim()).filter(t=>t),!!(t=t.split("#")[0].split("/").map(t=>t.trim()).filter(t=>t)).length&&t.reduce((t,n,r)=>!!t&&c.a.split(n.trim(),["|","+"]).reduce((t,n)=>{var[n,i]=l(n),s=(n=n.trim())===e[r];if(!s&&("deep"in i||"deepest"in i)){var o=e.slice(r+1).reduce((t,e,r)=>t>-1&&"deep"in i?t:e===n?r:t,-1);if(o>-1){e.splice(r,o+1);s=!0}}return t||s},!1),!0)}const f=(t,e)=>c.a.split(t.trim(),["|","+"],{preserveDelims:!0}).reduce((t,n)=>{var r;return(n.startsWith("|")||n.startsWith("+"))&&(r=n.substr(0,1),n=n.substr(1).trim()),t.theEnd||"|"===r&&t.length?(t.theEnd=!0,t):t.concat(e(n.trim()))},[]).filter(t=>t),d=(t,e,n)=>{const r=t=>t.reduce((t,e)=>t.concat(...n(e).values()),[]);return f(e,e=>{var[e,o]=l(e);return t.reduce((t,c)=>{var a=n(c);"*"===e&&(e="("+a.keys().join("+")+")");var u=Object(i.e)(e,"(",")")?d([c],Object(i.d)(e,"(",")"),n):Object(s.e)(a.get(e),!1),l=[];return Object.keys(o).forEach(t=>{if("deep"===t||"deepest"===t)for(var i=[c];("deepest"===t||!u.length)&&(i=r(i)).length;){var s=d(i,`${e}${l.map(t=>`:${t}(${o[t]})`).join("")}`,n);s.length&&(u=s)}else"having"!==t&&"not-having"!==t||(u=u.filter(e=>{var r=f(o[t],t=>n(e,t));return"not-having"===t?!r.length:r.length})),l.push(t)}),t.concat(u)},[])})},b=function(t,e,n,r=null,i=0){if(!e.length)return[];var s,o=e.shift();o.endsWith(".")&&(s=!0,o=o.substr(0,o.length-1).trim());var c=d(t,o,n);if(c.length&&s)return c;if(e.length){var a=b(c,e.slice(),n,r,i+1);return-1===a?r(c,i,!0):a}return r?r(c,i):c}},function(t,e,n){"use strict";var r=n(1),i=n(3),s=n(10),o=n(5),c=n(9);e.a=function(t,e=[],n=!0){var a=0;return Object(s.a)(arguments[0])&&Object(o.a)(arguments[1])&&(a=arguments[0],t=arguments[1],e=arguments[2]||[]),Object(c.a)([a,{},t],(t,n,s)=>Object(i.a)(e)?e(t):!Object(r.a)(e)||!e.length||e.indexOf(t)>-1,!1,!1,n)}},function(t,e,n){"use strict";var r=n(24),i=n(6),s=n(5);e.a=function(t){return Object(r.a)(t)||Object(i.a)(t)||!1===t||0===t||Object(s.a)(t)&&!Object.keys(t).length}},function(t,e,n){"use strict";var r=n(14),i=n(6);e.a=function(t){return!Object(r.a)(t)&&!Object(i.a)(t.length)}},function(t,e,n){"use strict";var r=n(28),i=n(44);e.a=function(t,e){var n=[];return Object(i.a)(t,e).forEach(t=>{Object(r.a)(n,...Object.getOwnPropertyNames(t))}),n}},function(t,e,n){"use strict";var r=n(1);e.a=function(t,e){e=(e=e||Object.prototype)&&!Object(r.a)(e)?[e]:e;var n=[];for(t=t;t&&(!e||e.indexOf(t)<0)&&"default"!==t.name;)n.push(t),t=t?Object.getPrototypeOf(t):null;return n}},function(t,e,n){"use strict";var r=n(32);e.a=function(t,e){return Object(r.a)(t,e,!0)}},,function(t,e,n){"use strict";e.a=function(t){return t.filter((t,e,n)=>n.indexOf(t)===e)}},function(t,e,n){"use strict";function r(t,e,n=null){return n||!1!==n&&t.dotSafe&&e.dotSafe?(t.join(".")+".").startsWith(e.join(".")+"."):e.reduce((e,n,r)=>e&&n===t[r],!0)}n.d(e,"a",(function(){return r}))},,function(t,e,n){"use strict";var r=n(21);e.a=function(t){return Object(r.a)(t)&&/^class\s?/.test(Function.prototype.toString.call(t))}},,function(t,e,n){"use strict";var r=n(1);e.a=function(t,e,n=null){return Object(r.a)(e)?t.filter(t=>n?e.filter(e=>n(t,e)).length:-1!==e.indexOf(t)):[]}},,,function(t,e,n){"use strict";var r=n(1);e.a=function(t,e,n=null){return Object(r.a)(e)?t.filter(t=>n?e.filter(e=>n(t,e)).length:-1===e.indexOf(t)):[]}},,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(4),i=n(0),s=(n(12),n(31)),o=n(39);function c(t=null,e=!1){const n=s.a.call(this);if(e)return void n.DOM.ready(()=>{c.call(this,t,!1)});const h=n.window,f=n.window.document,d=n.DOM.mutations,b=[],m=o.a.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},t);a.push(m.get("attr.importid"),m.get("attr.moduleref"));const p="["+h.CSS.escape(m.get("attr.moduleref"))+"]",g="["+h.CSS.escape(m.get("attr.exportgroup"))+"]",O=class{static create(t){return new O(t)}constructor(t){this.el=t;const[e,n]=Object(o.b)(t.getAttribute(m.get("attr.importid"))||"default");Object(i.b)(this.el,"oohtml").set("importID",e),Object(i.b)(this.el,"oohtml").set("importModifiers",n)}hydrate(t,e,n){Object(i.b)(this.el,"oohtml").set("anchorNode",t),Object(i.b)(this.el,"oohtml").set("slottedElements",e),Object(i.b)(this.el,"oohtml").set("compositionBlock",n),this._bindSlotted(e),this._connectToCompositionBlock()}connectedCallback(){Object(i.b)(this.el,"oohtml").has("anchorNode")||(Object(i.b)(this.el,"oohtml").set("anchorNode",m.get("isomorphic")?f.createComment(this.el.outerHTML):f.createTextNode("")),Object(i.b)(this.el,"oohtml").set("compositionBlock",this.el.hasAttribute(m.get("attr.moduleref"))?this.el.getAttribute(m.get("attr.moduleref")).trim().startsWith("~")?this.el.parentNode.closest(g):null:this.el.parentNode.closest(p)),this._connectToCompositionBlock()),n.DOM.ready.call(n,()=>{this.resolve()})}_connectToCompositionBlock(){this.compositionBlock&&Object(i.b)(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(t){t.forEach(t=>{t.importReference=this.el}),Object(i.b)(this.el,"oohtml").set("slottedObserver",d.onRemoved(t,(e,n,s,o,c)=>{c&&c.size===t.length&&Object(i.b)(this.el,"oohtml").get("slottedObserver").disconnect(),e.forEach(t=>{t.parentNode||Object(r.h)(this.slottedElements,t),t.importReference===this.el&&delete t.importReference}),this.slottedElements.length||this.anchorNode.isConnected&&this.anchorNode.replaceWith(this.el)},{maintainCallState:!0,ignoreTransients:!0}))}resolve(){if(!Object(r.b)(b,t=>this.el.closest(t))){var t,e;if(this.el.hasAttribute(m.get("attr.moduleref")))this.compositionBlock&&Object(i.b)(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&Object(i.b)(this.compositionBlock,"oohtml","imports").delete(this.importID),t=this.el;else{if(!this.compositionBlock)return void console.warn("Scoped slots must be found within template contexts. ["+this.importID+"]",this.el);t=this.compositionBlock}var n=t.getAttribute(m.get("attr.moduleref")).trim(),s=this.el.getAttribute(m.get("attr.exportsearch"));t&&(e=((t,e,n)=>{var r=this.importID,s=this.importModifiers,[c,a]="search"in s||null!==n?("search"in s?s.search:n).split("-").filter(t=>t).map(t=>parseInt(t||0)).concat([0,1e3]):[0,0];return Object(o.d)(t,e,(function(t,e){var n=Object(i.b)(t,"oohtml","templates");return 1===arguments.length?n:e.startsWith(":")?Object(i.b)(t,"oohtml","exports").get(e.substr(1)):n.get(e)}),(function(t,e,n){var s=t.reduce((t,e)=>t.concat(Object(i.b)(e,"oohtml","exports").get(r)||[]),[]);return!s.length&&e>c&&a?(a--,-1):s}))})([n.startsWith("~")?this.compositionBlock:f],n,s)).length?Object(r.c)(e,Object(i.b)(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(Object(i.b)(this.el,"oohtml").set("originalSlottedElements",e),this.fill(e)):(Object(i.b)(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(t){t=Object(r.e)(t,!1).map(t=>t.cloneNode(!0)),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),t.forEach(t=>{Object(i.b)(t,"oohtml","templates").set("~",this.el),function(t,e,n=[],i=!0){n=n.concat(a),t.hasAttribute("noinherit")&&(n=n.concat((t.getAttribute("noinherit")||"*").split(" ").map(t=>t.trim())));var s=l.concat(["role","class"]);if(Object(r.j)(s).forEach(s=>{var o,c;if(!n.includes(s)&&!n.includes("*")&&(o=e.getAttribute(s))){if(c=t.getAttribute(s))var a=i?[c,o]:[o,c];else a=[o];t.setAttribute(s,Object(r.j)(a.join(" ").split(" ").map(t=>t.trim())).join(" ")),n.push(s)}}),Object(r.j)(u.concat("style")).forEach(r=>{var s,o;if(!n.includes(r)&&!n.includes("*")&&(s=e.getAttribute(r))){if(o=t.getAttribute(r))(c=i?[o,s]:[s,o])[0].trim().endsWith(";")||(c[0]=c[0]+";");else var c=[s];t.setAttribute(r,c.join(" ")),n.push(r)}}),!n.includes("*"))for(var o=0;o<e.attributes.length;o++){var c=e.attributes[o];n.includes(c.name)||t.hasAttribute(c.name)&&!i||t.setAttribute(c.name,c.value)}}(t,this.el),t.getAttribute(m.get("attr.exportgroup"))||t.setAttribute(m.get("attr.exportgroup"),this.importID),this.anchorNode.before(t)}),this._bindSlotted(t),this.slottedElements.push(...t)}empty(t=!1){if(this.slottedElements){var e=this.slottedElements;t&&Object(i.b)(this.el,"oohtml").has("slottedObserver")&&(Object(i.b)(this.el,"oohtml").get("slottedObserver").disconnect(),e=this.slottedElements.splice(0)),e.forEach(t=>t.remove())}}get importID(){return Object(i.b)(this.el,"oohtml").get("importID")}get importModifiers(){return Object(i.b)(this.el,"oohtml").get("importModifiers")}get anchorNode(){return Object(i.b)(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return Object(i.b)(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return Object(i.b)(this.el,"oohtml").has("slottedElements")||Object(i.b)(this.el,"oohtml").set("slottedElements",[]),Object(i.b)(this.el,"oohtml").get("slottedElements")}get exports(){return Object(i.b)(this.el,"oohtml").get("exports")}static get observedAttributes(){return[m.get("attr.importid")]}};d.onPresent(m.get("element.import"),t=>{O.create(t).connectedCallback()});const v=(t,e)=>{const n=(t,n)=>!e||n===e||!0===e&&(this.importModifiers&&"search"in this.importModifiers||t.getAttribute(m.get("attr.exportsearch")));if(t.matches(m.get("element.import"))){var r=O.create(t);r.connectedCallback(),n(t,r.importID)&&r.resolve()}else Object(i.b)(t,"oohtml","imports").forEach((t,e)=>{n(t,e)&&O.create(t).resolve()})};d.onPresent(p,t=>{Object(r.b)(b,e=>t.closest(e))||d.onAttrChange(t,e=>{e[0].target.getAttribute(e[0].attributeName)!==e[0].oldValue&&v(t)},[m.get("attr.moduleref"),m.get("attr.importid")])}),f.addEventListener("templatemutation",t=>{t.detail.path&&Object(r.e)(f.querySelectorAll("["+h.CSS.escape(m.get("attr.moduleref"))+"]")).forEach(e=>{Object(o.c)(e.getAttribute(m.get("attr.moduleref")),t.detail.path)&&(v(e,!0),t.detail.addedExports.concat(t.detail.removedExports).forEach(t=>{v(e,t.name)}))})});n.DOM.ready.call(n,()=>{m.get("isomorphic")&&Object(r.e)(f.querySelectorAll(g)).forEach(t=>{if(!Object(i.b)(t.parentNode,"oohtml").get("importsCan")){var e=[];t.parentNode.childNodes.forEach(t=>{var n;if(1===t.nodeType&&t.matches(g))e.push(t);else if(8===t.nodeType&&(n=t.nodeValue.trim())&&n.startsWith("<"+m.get("element.import"))&&n.endsWith("</"+m.get("element.import")+">")){var r,i=f.createElement("div");if(i.innerHTML=n,(r=i.firstChild).matches(m.get("element.import"))){var s=r.hasAttribute(m.get("attr.moduleref"))?r.getAttribute(m.get("attr.moduleref")).trim().startsWith("~")?t.parentNode.closest(g):null:t.parentNode.closest(p);O.create(r).hydrate(t,e,s),e=[]}}}),Object(i.b)(t.parentNode,"oohtml").set("importsCan",!0)}})})}const a=["nocompose"],u=[],l=[]},,,,,,,function(t,e,n){"use strict";n.r(e),n(70).a.call(window)}]);
|
|
1
|
+
(()=>{"use strict";function t(t,e){return t.reduce(((t,r,n)=>t||e(r,n)),!1)}function e(t){return Array.isArray(t)}function r(t){return t instanceof String||"string"==typeof t&&null!==t}function n(t){return arguments.length&&(void 0===t||void 0===t)}function i(t){return"function"==typeof t}function s(t){return Array.isArray(t)||"object"==typeof t&&t||i(t)}function o(t){return!Array.isArray(t)&&"object"==typeof t&&t}function a(t,i=!0){return e(t)?t:!i&&o(t)?[t]:!1!==t&&0!==t&&function(t){return function(t){return null===t||""===t}(t)||n(t)||!1===t||0===t||s(t)&&!Object.keys(t).length}(t)?[]:function(t){return!r(t)&&!n(t.length)}(t)?Array.prototype.slice.call(t):o(t)?Object.values(t):[t]}function l(t){return t.filter(((t,e,r)=>r.indexOf(t)===e))}function c(t,...e){globalThis.WebQitInternalsRegistry||(globalThis.WebQitInternalsRegistry=new Map);var r,n,i=globalThis.WebQitInternalsRegistry.get(t);if(!i){if(i=new Map,!1===e[0])return i;globalThis.WebQitInternalsRegistry.set(t,i)}for(;r=e.shift();)if((n=i)&&!(i=i.get(r))){if(i=new Map,!1===e[0])return i;n.set(r,i)}return i}function h(t){return!Array.isArray(t)&&"object"==typeof t&&t}function u(){if(!(h(this)&&this.window||"undefined"!=typeof window))throw new Error("A window context is required.");const t=h(this)&&this.window?this.window:window;if(t.WebQit||(t.WebQit={}),!t.WebQit.window){let e,r;Object.defineProperty(t.WebQit,"window",{get:()=>t}),Object.defineProperty(t.WebQit,"vendor",{value:{getName:()=>(e||(e=function(t){if(void 0!==t.InstallTrigger)return"firefox";if(/constructor/i.test(t.HTMLElement)||"[object SafariRemoteNotification]"===(!t.safari||void 0!==t.safari&&t.safari.pushNotification).toString())return"safari";var e=!(!t.chrome||!t.chrome.webstore&&!t.chrome.runtime),r=e&&-1!=t.navigator.userAgent.indexOf("Edg"),n=!!t.opr&&!!t.opr.addons||!!t.opera||t.navigator.userAgent.indexOf(" OPR/")>=0,i=!!t.document.documentMode,s=!i&&!!t.StyleMedia;return(e||n)&&t.CSS,s?"edge":i?"ie":n?"opera":r?"ie-chromium":e?"chrome":"unknown"}(t)),e),getPrefix:()=>(r||(r=function(t){var e=t.getComputedStyle(t.document.documentElement,""),r=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.Olink&&["","o"])[1];return{api:("WebKit|Moz|Ms|O".match(new RegExp("("+r+")","i"))||[])[1],prefix:r,css:"-"+r+"-"}}(t)),r)}})}return t.WebQit}new Map;class m{constructor(t,e=!0){this.window=t,this.async=e,this.readCallbacks=[],this.writeCallbacks=[],this._run()}_run(){this.window.requestAnimationFrame((()=>{this.readCallbacks.forEach(((t,e)=>{t&&!t()&&(this.readCallbacks[e]=null)})),this.writeCallbacks.forEach(((t,e)=>{t&&!t()&&(this.writeCallbacks[e]=null)})),this._run()}))}onread(t,e=!1){if(e)return new Promise(((e,r)=>{!1===this.async?t(e,r):this.readCallbacks.push((()=>{t(e,r)}))}));!1===this.async?t():this.readCallbacks.push(t)}onwrite(t,e=!1){if(e)return new Promise(((e,r)=>{!1===this.async?t(e,r):this.writeCallbacks.push((()=>{t(e,r)}))}));!1===this.async?t():this.writeCallbacks.push(t)}cycle(t,e,r){this.onread((()=>{var n=t(r);if(n){var i=n=>{this.onwrite((()=>{var i=e(n,r);if(i){var s=r=>{this.cycle(t,e,r)};i instanceof Promise?i.then(s):s()}}))};n instanceof Promise?n.then(i):i()}}))}}function d(t){return t instanceof String||"string"==typeof t&&null!==t}function f(t){return Array.isArray(t)}function p(t){return arguments.length&&(void 0===t||void 0===t)}function g(t){return null===t||""===t}function b(t){return"function"==typeof t}function v(t){return Array.isArray(t)||"object"==typeof t&&t||b(t)}function w(t,e=!0){return f(t)?t:!e&&h(t)?[t]:!1!==t&&0!==t&&function(t){return g(t)||p(t)||!1===t||0===t||v(t)&&!Object.keys(t).length}(t)?[]:function(t){return!d(t)&&!p(t.length)}(t)?Array.prototype.slice.call(t):h(t)?Object.values(t):[t]}function y(t){const e=u.call(this);e.DOM.isDOMReady||"complete"===e.window.document.readyState?t(e.window):(e.window.domReadyCallbacks||(e.window.domReadyCallbacks=[],e.window.document.addEventListener("DOMContentLoaded",(()=>{e.DOM.isDOMReady=!0,e.window.domReadyCallbacks.splice(0).forEach((t=>t(e.window)))}),!1)),e.window.domReadyCallbacks.push(t))}class O{constructor(t){this.window=t}onAdded(t,e,r={}){return r.on="added",this.onPresenceChange(t,((t,r,n,i,s)=>{e(t,r,n,i,s)}),r)}onRemoved(t,e,r={}){return r.on="removed",this.onPresenceChange(t,((t,r,n,i,s)=>{e(t,r,n,i,s)}),r)}onPresent(t,e,r={}){y.call(this.window,(()=>{this.window.MutationObserver&&this.onAdded(t,((t,r)=>{t.forEach((t=>e(t,r)))}),r),d(t)?w(this.window.document.querySelectorAll(t)).forEach((t=>e(t,1))):t.parentNode&&e(t,1)}))}onAbsent(t,e,r={}){y.call(this.window,(()=>{this.window.MutationObserver&&onRemoved(t,((t,r)=>{t.forEach((t=>e(t,r)))}),r),d(t)?0===w(this.window.document.querySelectorAll(t)).length&&e(null,0):t.parentNode||e(t,0)}))}onPresenceChange(t,e,r={}){t=w(t,!1);var n=new Set,i=new Set,s=(s,o,a)=>{o&&"removed"===r.on||!o&&"added"===r.on||(s=((t,e)=>(e.$$searchCache||(e.$$searchCache=new Map),t.reduce(((t,n)=>{var i;return e.$$searchCache.has(n)?i=e.$$searchCache.get(n):(i=((t,e)=>{if(e=e.filter((t=>t.matches)),d(t)){var n=e.filter((e=>e.matches(t)));if(!1!==r.observeIndirectMutation&&(n=e.reduce(((e,r)=>e.concat(w(r.querySelectorAll(t)))),n)).length)return n}else{if(e.includes(t))return[t];if(!1!==r.observeIndirectMutation&&e.length)for(var i=t;i=i.parentNode;)if(e.includes(i))return[t]}})(n,e,d(n))||[],e.$$searchCache.set(n,i)),t.concat(i)}),[])))(t,s)).length&&(r.maintainCallState?(s.forEach((t=>{o?(n.add(t),i.delete(t)):(n.delete(t),i.add(t))})),e(s,o,a,n,i)):e(s,o,a))},o=r.context||this.window.document.documentElement;return this._observe(o,((t,e,n,i)=>{r.ignoreTransients||(s(t,0,!0),s(t.concat(e),1,!0),s(e,0,!0)),s(i,0),s(n,1)}))}onAttrChange(t,e,r=[]){var n=new this.window.MutationObserver(e),i={attributes:!0,attributeOldValue:!0};return r&&(i.attributeFilter=r),n.observe(t,i),n}onTreeChange(t,e,r=!1){var n=new this.window.MutationObserver(e),i={childList:!0,subtree:r};return n.observe(t,i),n}onMutation(t,e,r){var n=new this.window.MutationObserver(e);return n.observe(t,r),n}_observe(t,e){if(!k.has(t)){const e=new Set,r=new this.window.MutationObserver((t=>{if(e.size){var r=t.reduce(((t,e)=>t.concat(w(e.addedNodes))),[]),n=t.reduce(((t,e)=>t.concat(w(e.removedNodes))),[]),i=[],s=[];r=new Set(r),n=new Set(n),r.forEach((t=>{n.has(t)&&(n.delete(t),r.delete(t),t.isConnected?i.push(t):s.push(t))})),r=[...r],n=[...n],e.forEach((t=>t(i,s,r,n)))}}));r.observe(t,{childList:!0,subtree:!0}),k.set(t,{callbacks:e,observer:r})}const r=k.get(t);return r.callbacks.add(e),{disconnect(){r.callbacks.delete(e)},reconnect(){r.callbacks.add(e)}}}}const k=new Map;function E(t,e=null,r=!1){const n=u.call(this);if(d(t)){var i;if(t.trim().startsWith("<")){var s=n.window.document.createElement("div");s.innerHTML=t,i=r?w(s.children):s.firstChild}else i=r?w(M.call(this,t,e)):A.call(this,t,e);return i}return t instanceof n.window.Element?r?[t]:t:r?w(t):t}function C(t,e=null){return E.call(this,t,e,!0)}function A(t,e=null,r=!1){const n=u.call(this);e=e||n.window.document;var i,s=r?"querySelectorAll":"querySelector";try{i=e[s](t)}catch(r){try{i=e[s](t.replace(/\:is\(/g,":matches("))}catch(r){try{i=e[s](t.replace(/\:is\(/g,":-webkit-any("))}catch(r){try{i=e[s](t.replace(/\:is\(/g,":-moz-any("))}catch(t){throw t}}}}return i}function M(t,e=null){return A.call(this,t,e,!0)}function $(t){return function(t){return t instanceof Number||"number"==typeof t}(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)}function x(t){return b(t)||t&&"[object function]"==={}.toString.call(t)}function S(t,e,r={},n={}){e=w(e).slice();for(var i=t;!p(i)&&!g(i)&&e.length;){var s=e.shift();if(!(r.get?r.get(i,s):v(i)?s in i:i[s]))return void(n.exists=!1);i=r.get?r.get(i,s):i[s]}return n.exists=!0,i}function N(t,e,r,n={},i={}){const s=(t,r,n)=>i.set?i.set(t,r,n):($(e[a])&&f(t)?t.push(n):t[r]=n,!0);e=w(e);for(var o=t,a=0;a<e.length;a++){if(!(a<e.length-1))return s(o,e[a],r);if(!o||!v(o)&&!x(o))return!1;var l=S(o,e[a],i);if(!v(l)){if(!1===i.buildTree)return!1;if(l=x(i.buildTree)?i.buildTree(a):$(e[a+1])?[]:{},!s(o,e[a],l))return!1}o=l}}function j(t,e,r=!1,n={}){e=w(e);var i=!1;do{var s=""===(s=e.pop())?0:s,o=t;e.length&&(o=S(t,e,{},n)),(v(o)||x(o))&&(n.has?n.has(o,s):s in o)&&(n.deleteProperty?i=n.deleteProperty(o,s):n.del?i=n.del(o,s):(delete o[s],i=!0))}while(i&&r&&e.length&&(v(o)||x(o))&&!(n.keys?n.keys(o):Object.keys(o)).length);return i}function D(t,e,r={}){var n={};return S(t,e,r,n),n.exists}function _(t,e=!1){const r=u.call(this);var n={};return!(n.el=r.window.document.head.querySelector('meta[name="oohtml"]'))&&e&&(n.el=r.window.document.createElement("meta"),n.el.setAttribute("name",t),r.window.document.head.append(n.el)),n.el&&(n.vars=(n.el.getAttribute("content")||"").split(";").filter((t=>t)).reduce(((t,e)=>{var r=e.split("=").map((t=>t.trim()));return N(t,r[0].split("."),"true"===r[1]||"false"!==r[1]&&($(r[1])?parseInt(r[1]):r[1])),t}),{})),n.get=function(t){return S(this.vars,t.split("."))},n.set=function(t,r=null,n=!1){var i=h(t)?t:{[t]:!0===r?"true":r};if(n=arguments.length<3?r:n,Object.keys(i).forEach((t=>{if(!1===i[t])j(this.vars,t.split("."));else if(h(i[t]))Object.keys(i[t]).forEach((e=>{var r=(t+"."+e).split(".");n&&D(this.vars,r)||N(this.vars,r,i[t][e])}));else{var e=t.split(".");n&&D(this.vars,e)||N(this.vars,e,i[t])}})),e){const t=(e,r)=>Object.keys(r).reduce(((n,i)=>{var s=(e?e+".":"")+i;return h(r[i])?n.push(...t(s,r[i])):n.push(s+"="+r[i]),n}),[]);this.el.setAttribute("content",t("",this.vars).join(";"))}return!0},n.defaults=function(t,e=null){return this.set(t,e,!0)},n}function T(){const t=u.call(this);return t.DOM||(t.DOM={},function(t){!function(t){t.CSS||(t.CSS={}),t.CSS.escape||(t.CSS.escape=t=>t.replace(/([\:@\~\$\&])/g,"\\$1"))}(t),function(t){"isConnected"in t.Node.prototype||Object.defineProperty(t.Node.prototype,"isConnected",{get:function(){return!(this.ownerDocument&&this.ownerDocument.compareDocumentPosition(this)&this.DOCUMENT_POSITION_DISCONNECTED)}})}(t),function(t){t.Element.prototype.matches||(t.Element.prototype.matches=t.Element.prototype.matchesSelector||t.Element.prototype.mozMatchesSelector||t.Element.prototype.msMatchesSelector||t.Element.prototype.oMatchesSelector||t.Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),r=e.length;--r>=0&&e.item(r)!==this;);return r>-1})}(t)}(t.window),t.DOM.reflow=new m(t.window),t.DOM.mutations=new O(t.window),t.DOM.meta=_.bind(t.window),t.DOM.query=E.bind(t.window),t.DOM.queryAll=C.bind(t.window),t.DOM.ready=y.bind(t.window)),t}function W(t,e,r){return function(t,e){return function(t,e,r=!1){if(""==e)return t;var n=r?t.lastIndexOf(e):t.indexOf(e);return-1===n?t:t.substr(0,n)}(t,e,!0)}(function(t,e,r=!1){if(""==e)return t;var n=r?t.lastIndexOf(e):t.indexOf(e);return-1===n?"":t.substr(n+e.length)}(t,e),r)}function P(t){return i(t)||t&&"[object function]"==={}.toString.call(t)}function I(t){return t instanceof Number||"number"==typeof t}function R(t){return I(t)||!0!==t&&!1!==t&&null!==t&&""!==t&&!isNaN(1*t)}function q(t,r,n=!1,i=!1,a=!1){var l=0,c=t.shift();if((R(c)||!0===c||!1===c)&&(l=c,c=t.shift()),!t.length)throw new Error("_merge() requires two or more array/objects.");return t.forEach(((t,h)=>{var u,m,d;(s(t)||P(t))&&(n?(u=t,d=[],function(t,r){r=(r=r||Object.prototype)&&!e(r)?[r]:r;var n=[];for(t=t;t&&(!r||r.indexOf(t)<0)&&"default"!==t.name;)n.push(t),t=t?Object.getPrototypeOf(t):null;return n}(u,m).forEach((t=>{!function(t,...e){e.forEach((e=>{t.indexOf(e)<0&&t.push(e)}))}(d,...Object.getOwnPropertyNames(t))})),d):Object.getOwnPropertyNames(t)).forEach((s=>{if(r(s,c,t,h)){var u=c[s],m=t[s];if((e(u)&&e(m)||o(u)&&o(m))&&(!0===l||l>0))c[s]=e(u)&&e(m)?[]:{},q([R(l)?l-1:l,c[s],u,m],r,n,i,a);else if(e(c)&&e(t))i?c[s]=m:c.push(m);else try{a?Object.defineProperty(c,s,Object.getOwnPropertyDescriptor(t,s)):c[s]=t[s]}catch(t){}}}))})),c}function L(...t){return q(t,((t,e,r)=>!0),!1,!1,!1)}const Q=function(t,r=1,n=!0){return!R(r)||r<=0?t:(!e(t)&&o(t)&&n&&(t=Object.values(t)),e(t)?t.reduce(((t,i)=>e(i)||o(i)&&n?t.concat(Q(e(i)?i:Object.values(i),r-1,n)):t.concat(i)),[]):t)},B=Q;function H(t,e=1){var r=0;t.forEach((t=>{r++}));var n=t.slice(t.length-r,e);return arguments.length>1?n:n[0]}function z(t,e=1){return arguments.length>1?H(t.slice().reverse(),e).reverse():H(t.slice().reverse())}function F(t){return o(t)&&Object.getPrototypeOf(t)===Object.prototype}function V(t){return!0===t||!1===t}const U=function(t,r,n=!0,i=1){if(e(t)&&e(r)&&t.length!==r.length)return!n;if(o(t)&&o(r)){var a=Object.keys(t),l=Object.keys(r);if(!a.length&&!l.length)return F(t)&&F(r)?n:t===r===n;if(!U(a,l))return!n}if(i>0&&(e(t)&&e(r)||o(t)&&o(r))){var c=function(t,r,n=!0,i=!0,a=!1,l=!1){if(e(t)&&e(r)){var c=[],h=!0;return t.forEach((t=>{if(h){var u,m,d,f=!1;m=(r,a)=>{(!f||i&&s(t))&&((e(f=n(t,a))&&!f.length||o(f)&&!Object.keys(f).length)&&(f=!1),s(f)&&i&&(t=f))},d=void 0,s(u=r)&&Object.keys(u).forEach(((t,e)=>{!1!==d&&(d=m(R(t)&&parseFloat(t),u[t]))})),s(f)?c.push(i?f:t):V(f)?a&&!f||!a&&f?c.push(t):l&&(h=!1):c.push(f)}})),c}if(o(t)&&o(r))return c={},h=!0,Object.keys(t).forEach((u=>{if(h){var m=n(t[u],r[u]);(e(m)&&!m.length||o(m)&&!Object.keys(m).length)&&(m=!1),s(m)?c[u]=i?m:t[u]:V(m)?a&&!m||!a&&m?c[u]=t[u]:l&&(h=!1):c[u]=m}})),c}(t,r,((t,e)=>U(t,e,n,i-1)),!1,!1,!0);return e(c)?c.length===t.length&&c.length===r.length:o(c)&&o(t)?Object.keys(c).length===Object.keys(t).length&&Object.keys(c).length===Object.keys(r).length:c}return P(n)?n(t,r):I(t)&&I(r)&&isNaN(t)&&isNaN(r)?n:t===r===n},K=U;function G(t,r=[]){return q([{},t],((t,n,i)=>{if(!P(i[t]))return P(r)?r(t):!e(r)||!r.length||r.indexOf(t)>-1}),!1,!1,!1)}class J{static lex(t,e,n={}){if(!r(t+=""))throw new Error("Argument1 must be a string!");var i=t=>({delims:t.delims.slice(),options:G(t.options),nesting:t.nesting.slice(),maxDepth:t.maxDepth,comments:t.comments.slice(),tokens:t.tokens.slice(),matches:t.matches.slice(),matchesi:G(t.matchesi)});if(J.$cache[t]&&!1!==n.cache)for(var s=0;s<J.$cache[t].length;s++){var o=J.$cache[t][s];if(K(o.delims,e))return i(o)}var a=new J(t,n).lex(e);return!1!==n.cache&&(J.$cache[t]=J.$cache[t]||[],J.$cache[t].push(a)),i(a)}static split(t,e,r){return J.lex(t,e,r).tokens}static match(t,e,r){return J.lex(t,e,r).matches}constructor(t,e){if(!r(t))throw new Error("Lexer requires the first argument to be a string.");this.$str=t,this.$options=e||{},this.$options.blocks||(this.$options.blocks=J.$blocks),this.$options.quotes||(this.$options.quotes=J.$quotes),this.$options.comments||(this.$options.comments=J.$comments)}lex(t,e){for(var r={delims:a(t),options:L(!0,{},this.$options,e||{}),nesting:[],maxDepth:0,comments:[],tokens:[],matches:[],matchesi:{}},n=0;"number"==typeof n;)n=this._evalCharsAt(r,n);if(r.nesting.length)throw new Error("Error parsing the string: "+this.$str+". Unterminated blocks: "+B(r.nesting).join(", "));return r}_evalCharsAt(t,e){if(!(e>=this.$str.length)){var r=1,n={},i={},s={};if(t.openComment||(i=this._testQuotes(t,e)),t.openQuote||(n=this._testComments(t,e)),t.openComment||n.ending)t.nesting.length||s.ending?this._push(t,this.$str[e]):(r=(a=n.starting||n.ending||this.$str[e]).length,this._push(t,a,"comments",n.starting));else if(t.openQuote||i.ending)this._push(t,this.$str[e]);else{if(t.options.limit&&t.matches.length===t.options.limit)return this._push(t,this.$str[e]),e+1;s=this._testNesting(t,e),s=this._testNesting(t,e);var o=this._testChars(t.options.stopChars||[],t,e);if(!t.nesting.length&&!1!==o)return t.options.stopChar=o,void(t.options.stopCharForward=this.$str.substr(e));if(t.delims.length)if(t.nesting.length||s.ending){var a;r=(a=s.starting||s.ending||this.$str[e]).length,this._push(t,a)}else{this._push(t,"");var l=this._testChars(t.delims,t,e);if(!1!==l&&(t.matches.push(l),t.matchesi[e]=l,r=l.length||1,!t.options.preserveDelims)){var c=e+(l.length||1);return c===this.$str.length&&this._push(t,""),c}this._push(t,l||this.$str[e])}else 2===t.nesting.length&&s.starting?(t.matches.push(null),this._push(t,s.starting),r=s.starting.length):!t.nesting.length&&s.ending?(this._push(t,s.ending),r=s.ending.length,t.matches.push(null)):this._push(t,this.$str[e])}return e+r}}_testQuotes(t,e){var r={};return(t.options.quotes||[]).forEach((n=>{this.$str.substr(e,1)===n&&(t.openQuote?n===t.openQuote&&(t.openQuote=!1,r.ending=n):(t.openQuote=n,r.starting=n))})),r}_testComments(t,e){var r={};return(t.options.comments||[]).forEach((n=>{if(t.openComment){if(z(n)===z(t.openComment)){var i=z(n);this.$str.substr(e).startsWith(i)&&(t.openComment=!1,r.ending=i)}}else{var s=H(n);this.$str.substr(e).startsWith(s)&&(t.openComment=n,r.starting=s)}})),r}_testNesting(t,e){var r={};return(t.options.blocks||[]).forEach((n=>{var i=H(n);if(this.$str.substr(e).startsWith(i))t.nesting=t.nesting.concat([n]),r.starting=i;else if(t.nesting.length&&z(n)===z(z(t.nesting))){var s=z(n);this.$str.substr(e).startsWith(s)&&(t.nesting=t.nesting.slice(0,-1),r.ending=s)}})),t.maxDepth=Math.max(t.maxDepth,t.nesting.length),r}_testChars(t,e,r){for(var n=0;n<t.length;n++){var i=t[n];if(P(i)){var s=i(this.$str.substr(0,r),this.$str.substr(r),e.tokens.slice());if(!1!==s)return s}if(e.options.useRegex){var o=this.$str.substr(r).match(new RegExp("^"+i,!0!==e.options.useRegex?e.options.useRegex:""));if(o)return o[0]}if(!e.options.ci&&this.$str.substr(r,i.length)===i||e.options.ci&&this.$str.substr(r,i.length).toLowerCase()===i.toLowerCase())return i}return!1}_push(t,e,r="tokens",i=!1){var s=t.matches.length;if(n(t.tokens[s])&&(t.tokens[s]=""),"comments"===r){t.tokens[s].comments||(t.tokens[s]=new String(t.tokens[s]),t.tokens[s].comments=[]);var o=t.tokens[s].comments.length-(!t.tokens[s].comments.length||i?0:1);t.tokens[s].comments[o]=(t.tokens[s].comments[o]||"")+e}else t.tokens[s].comments,t.tokens[s]=t.tokens[s]+e}split(t,e,r){return this.lex(e,r).tokens}match(t,e,r){return this.lex(e,r).matches}regParse(t,e){return this.lex(t,L({useRegex:!0},e||{}))}regSplit(t,e){return this.regParse(t,e).tokens}regMatch(t,e){return this.regParse(t,e).matches}}function X(t,e={}){const r=T.call(this);return r.OOHTML||(r.OOHTML={}),r.OOHTML.meta||(r.OOHTML.meta=r.DOM.meta("oohtml",!0)),r.OOHTML.meta.defaults(L(3,t,e)),r.OOHTML.meta}function Y(t){var e=J.split(t.trim(),[":"]);return[t=e.shift(),e.reduce(((t,e)=>{var[r,n]=J.split(e.trim(),[]);return t[r]=W(n,"(",")"),t}),{})]}J.$blocks=[["(",")"],["[","]"],["{","}"]],J.$quotes=['"',"'","`"],J.$comments=[["/*","*/"],["//","\n"]],J.$cache=Object.create(null);const Z=(t,e)=>J.split(t.trim(),["|","+"],{preserveDelims:!0}).reduce(((t,r)=>{var n;return(r.startsWith("|")||r.startsWith("+"))&&(n=r.substr(0,1),r=r.substr(1).trim()),t.theEnd||"|"===n&&t.length?(t.theEnd=!0,t):t.concat(e(r.trim()))}),[]).filter((t=>t)),tt=(t,e,r)=>{const n=t=>t.reduce(((t,e)=>t.concat(...r(e).values())),[]);return Z(e,(e=>{var[e,i]=Y(e);return t.reduce(((t,s)=>{var o=r(s);"*"===e&&(e="("+o.keys().join("+")+")");var l,c=("(",")",(l=e).startsWith("(")&&l.endsWith(")")?tt([s],W(e,"(",")"),r):a(o.get(e),!1)),h=[];return Object.keys(i).forEach((t=>{if("deep"===t||"deepest"===t)for(var o=[s];("deepest"===t||!c.length)&&(o=n(o)).length;){var a=tt(o,`${e}${h.map((t=>`:${t}(${i[t]})`)).join("")}`,r);a.length&&(c=a)}else"having"!==t&&"not-having"!==t||(c=c.filter((e=>{var n=Z(i[t],(t=>r(e,t)));return"not-having"===t?!n.length:n.length}))),h.push(t)})),t.concat(c)}),[])}))},et=function(t,e,r,n=null,i=0){if(!e.length)return[];var s,o=e.shift();o.endsWith(".")&&(s=!0,o=o.substr(0,o.length-1).trim());var a=tt(t,o,r);if(a.length&&s)return a;if(e.length){var l=et(a,e.slice(),r,n,i+1);return-1===l?n(a,i,!0):l}return n?n(a,i):a},rt=["nocompose"],nt=[],it=[];(function r(n=null,i=!1){const s=T.call(this);if(i)return void s.DOM.ready((()=>{r.call(this,n,!1)}));const o=s.window,h=s.window.document,u=s.DOM.mutations,m=[],d=X.call(this,{element:{import:"import"},attr:{importid:"name",exportsearch:"exportsearch"}},n);rt.push(d.get("attr.importid"),d.get("attr.moduleref"));const f="["+o.CSS.escape(d.get("attr.moduleref"))+"]",p="["+o.CSS.escape(d.get("attr.exportgroup"))+"]",g=class{static create(t){return new g(t)}constructor(t){this.el=t;const[e,r]=Y(t.getAttribute(d.get("attr.importid"))||"default");c(this.el,"oohtml").set("importID",e),c(this.el,"oohtml").set("importModifiers",r)}hydrate(t,e,r){c(this.el,"oohtml").set("anchorNode",t),c(this.el,"oohtml").set("slottedElements",e),c(this.el,"oohtml").set("compositionBlock",r),this._bindSlotted(e),this._connectToCompositionBlock()}connectedCallback(){c(this.el,"oohtml").has("anchorNode")||(c(this.el,"oohtml").set("anchorNode",d.get("isomorphic")?h.createComment(this.el.outerHTML):h.createTextNode("")),c(this.el,"oohtml").set("compositionBlock",this.el.hasAttribute(d.get("attr.moduleref"))?this.el.getAttribute(d.get("attr.moduleref")).trim().startsWith("~")?this.el.parentNode.closest(p):null:this.el.parentNode.closest(f)),this._connectToCompositionBlock()),s.DOM.ready.call(s,(()=>{this.resolve()}))}_connectToCompositionBlock(){this.compositionBlock&&c(this.compositionBlock,"oohtml","imports").set(this.importID,this.el)}_bindSlotted(t){t.forEach((t=>{t.importReference=this.el})),c(this.el,"oohtml").set("slottedObserver",u.onRemoved(t,((e,r,n,i,s)=>{s&&s.size===t.length&&c(this.el,"oohtml").get("slottedObserver").disconnect(),e.forEach((t=>{t.parentNode||function(t,e,r=!1){for(var n=t.indexOf(e);n>-1&&(r||!1===r);)t.splice(n,1),r>0&&r--,n=t.indexOf(e)}(this.slottedElements,t),t.importReference===this.el&&delete t.importReference})),this.slottedElements.length||this.anchorNode.isConnected&&this.anchorNode.replaceWith(this.el)}),{maintainCallState:!0,ignoreTransients:!0}))}resolve(){if(!t(m,(t=>this.el.closest(t)))){var r,n;if(this.el.hasAttribute(d.get("attr.moduleref")))this.compositionBlock&&c(this.compositionBlock,"oohtml","imports").get(this.importID)===this.el&&c(this.compositionBlock,"oohtml","imports").delete(this.importID),r=this.el;else{if(!this.compositionBlock)return void console.warn("Scoped slots must be found within template contexts. ["+this.importID+"]",this.el);r=this.compositionBlock}var i=r.getAttribute(d.get("attr.moduleref")).trim(),s=this.el.getAttribute(d.get("attr.exportsearch"));r&&(n=((t,e,r)=>{var n=this.importID,i=this.importModifiers,[s,o]="search"in i||null!==r?("search"in i?i.search:r).split("-").filter((t=>t)).map((t=>parseInt(t||0))).concat([0,1e3]):[0,0];return function(t,e,r,n=null){var i=e.split("#")[0].split("/").map((t=>t.trim())).filter((t=>t));return et(t,i,r,n)}(t,e,(function(t,e){var r=c(t,"oohtml","templates");return 1===arguments.length?r:e.startsWith(":")?c(t,"oohtml","exports").get(e.substr(1)):r.get(e)}),(function(t,e,r){var i=t.reduce(((t,e)=>t.concat(c(e,"oohtml","exports").get(n)||[])),[]);return!i.length&&e>s&&o?(o--,-1):i}))})([i.startsWith("~")?this.compositionBlock:h],i,s)).length?function(t,r,n=null){return e(r)?t.filter((t=>n?r.filter((e=>n(t,e))).length:-1===r.indexOf(t))):[]}(n,c(this.el,"oohtml").get("originalSlottedElements")||[]).length&&(c(this.el,"oohtml").set("originalSlottedElements",n),this.fill(n)):(c(this.el,"oohtml").set("originalSlottedElements",null),this.empty())}}fill(t){t=a(t,!1).map((t=>t.cloneNode(!0))),this.empty(!0),this.el.isConnected&&this.el.replaceWith(this.anchorNode),t.forEach((t=>{c(t,"oohtml","templates").set("~",this.el),function(t,e,r=[],n=!0){if(r=r.concat(rt),t.hasAttribute("noinherit")&&(r=r.concat((t.getAttribute("noinherit")||"*").split(" ").map((t=>t.trim())))),l(it.concat(["role","class"])).forEach((i=>{var s,o;if(!r.includes(i)&&!r.includes("*")&&(s=e.getAttribute(i))){if(o=t.getAttribute(i))var a=n?[o,s]:[s,o];else a=[s];t.setAttribute(i,l(a.join(" ").split(" ").map((t=>t.trim()))).join(" ")),r.push(i)}})),l(nt.concat("style")).forEach((i=>{var s,o;if(!r.includes(i)&&!r.includes("*")&&(s=e.getAttribute(i))){if(o=t.getAttribute(i))(a=n?[o,s]:[s,o])[0].trim().endsWith(";")||(a[0]=a[0]+";");else var a=[s];t.setAttribute(i,a.join(" ")),r.push(i)}})),!r.includes("*"))for(var i=0;i<e.attributes.length;i++){var s=e.attributes[i];r.includes(s.name)||t.hasAttribute(s.name)&&!n||t.setAttribute(s.name,s.value)}}(t,this.el),t.getAttribute(d.get("attr.exportgroup"))||t.setAttribute(d.get("attr.exportgroup"),this.importID),this.anchorNode.before(t)})),this._bindSlotted(t),this.slottedElements.push(...t)}empty(t=!1){if(this.slottedElements){var e=this.slottedElements;t&&c(this.el,"oohtml").has("slottedObserver")&&(c(this.el,"oohtml").get("slottedObserver").disconnect(),e=this.slottedElements.splice(0)),e.forEach((t=>t.remove()))}}get importID(){return c(this.el,"oohtml").get("importID")}get importModifiers(){return c(this.el,"oohtml").get("importModifiers")}get anchorNode(){return c(this.el,"oohtml").get("anchorNode")}get compositionBlock(){return c(this.el,"oohtml").get("compositionBlock")}get slottedElements(){return c(this.el,"oohtml").has("slottedElements")||c(this.el,"oohtml").set("slottedElements",[]),c(this.el,"oohtml").get("slottedElements")}get exports(){return c(this.el,"oohtml").get("exports")}static get observedAttributes(){return[d.get("attr.importid")]}};u.onPresent(d.get("element.import"),(t=>{g.create(t).connectedCallback()}));const b=(t,e)=>{const r=(t,r)=>!e||r===e||!0===e&&(this.importModifiers&&"search"in this.importModifiers||t.getAttribute(d.get("attr.exportsearch")));if(t.matches(d.get("element.import"))){var n=g.create(t);n.connectedCallback(),r(t,n.importID)&&n.resolve()}else c(t,"oohtml","imports").forEach(((t,e)=>{r(t,e)&&g.create(t).resolve()}))};u.onPresent(f,(e=>{t(m,(t=>e.closest(t)))||u.onAttrChange(e,(t=>{t[0].target.getAttribute(t[0].attributeName)!==t[0].oldValue&&b(e)}),[d.get("attr.moduleref"),d.get("attr.importid")])})),h.addEventListener("templatemutation",(t=>{t.detail.path&&a(h.querySelectorAll("["+o.CSS.escape(d.get("attr.moduleref"))+"]")).forEach((e=>{(function(t,e){return e=e.split("#")[0].split("/").map((t=>t.trim())).filter((t=>t)),!!(t=t.split("#")[0].split("/").map((t=>t.trim())).filter((t=>t))).length&&t.reduce(((t,r,n)=>!!t&&J.split(r.trim(),["|","+"]).reduce(((t,r)=>{var[r,i]=Y(r),s=(r=r.trim())===e[n];if(!s&&("deep"in i||"deepest"in i)){var o=e.slice(n+1).reduce(((t,e,n)=>t>-1&&"deep"in i?t:e===r?n:t),-1);o>-1&&(e.splice(n,o+1),s=!0)}return t||s}),!1)),!0)})(e.getAttribute(d.get("attr.moduleref")),t.detail.path)&&(b(e,!0),t.detail.addedExports.concat(t.detail.removedExports).forEach((t=>{b(e,t.name)})))}))})),s.DOM.ready.call(s,(()=>{d.get("isomorphic")&&a(h.querySelectorAll(p)).forEach((t=>{if(!c(t.parentNode,"oohtml").get("importsCan")){var e=[];t.parentNode.childNodes.forEach((t=>{var r;if(1===t.nodeType&&t.matches(p))e.push(t);else if(8===t.nodeType&&(r=t.nodeValue.trim())&&r.startsWith("<"+d.get("element.import"))&&r.endsWith("</"+d.get("element.import")+">")){var n,i=h.createElement("div");if(i.innerHTML=r,(n=i.firstChild).matches(d.get("element.import"))){var s=n.hasAttribute(d.get("attr.moduleref"))?n.getAttribute(d.get("attr.moduleref")).trim().startsWith("~")?t.parentNode.closest(p):null:t.parentNode.closest(f);g.create(n).hydrate(t,e,s),e=[]}}})),c(t.parentNode,"oohtml").set("importsCan",!0)}}))}))}).call(window)})();
|
|
2
2
|
//# sourceMappingURL=html-imports.js.map
|
|
Binary file
|