@micro-lc/preview 0.4.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  ## Unreleased
2
2
 
3
+ ## [0.4.1] - 2023-04-07
4
+
5
+ ### Versioning
6
+
7
+ - `typescript` v5
8
+ - development dependencies bumped
9
+
10
+ ### Fixed
11
+
12
+ - `__focus_handler` supports also null elements
13
+
14
+ ### Added
15
+
16
+ - `__focus_handler` supports also async mode
17
+ - preview has a lighter overlay
18
+ - `request-resource` message type support
19
+
3
20
  ## [0.4.0] - 2023-03-13
4
21
 
5
22
  ### BREAKING CHANGES
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { Manifest } from '@micro-lc/back-kit-engine/schemas';
2
2
  import type { Component, PluginConfiguration } from '@micro-lc/interfaces/schemas/v2';
3
3
  interface TagInfo {
4
+ definitions?: Record<string, unknown>;
4
5
  description?: string;
5
6
  label?: string;
6
7
  properties?: Manifest['properties'];
@@ -26,6 +27,10 @@ interface OptionMessage {
26
27
  };
27
28
  type: 'options';
28
29
  }
30
+ interface RequestResource {
31
+ content: Record<string, unknown>;
32
+ type: 'request-resource';
33
+ }
29
34
  type RegisteredElementMessages = {
30
35
  content: ElementContent | undefined;
31
36
  type: 'click-element';
@@ -68,7 +73,7 @@ type RegisteredMessages = {
68
73
  } | {
69
74
  content: InfoEntry[];
70
75
  type: 'tag-info';
71
- } | RegisteredConfigMessages | UpdatedMessage | RegisteredElementMessages | OptionMessage;
76
+ } | RegisteredConfigMessages | UpdatedMessage | RegisteredElementMessages | OptionMessage | RequestResource;
72
77
  interface NotifyProps extends Record<string, unknown> {
73
78
  data?: Record<string, string>;
74
79
  description: string;
@@ -104,6 +109,6 @@ declare class PostChannel {
104
109
  send(to: Window, message: RegisteredMessages, origin?: string): void;
105
110
  recv(window: Window, from?: Window | null): () => void;
106
111
  }
107
- export type { OverlayMode, InfoEntry, ElementContent, StyledElementContent, NewConfigurationMessage, UpdateConfigurationMessage, RegisteredConfigMessages, RegisteredMessages, OptionMessage, NotifyProps, Reset, Update, };
112
+ export type { OverlayMode, InfoEntry, ElementContent, StyledElementContent, NewConfigurationMessage, UpdateConfigurationMessage, RegisteredConfigMessages, RegisteredMessages, OptionMessage, NotifyProps, Reset, Update, RequestResource, };
108
113
  export { MIA_PREVIEW_ID, OVERLAY_Z_INDEX, DEFAULT_MODE, isRegisteredMessage, PostChannel, };
109
114
  export * from './handlebars';
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ const keys = {
15
15
  'new-configuration': DebugMessage.Default,
16
16
  notification: DebugMessage.Default,
17
17
  options: DebugMessage.Default,
18
+ 'request-resource': DebugMessage.Default,
18
19
  'tag-info': DebugMessage.Default,
19
20
  update: DebugMessage.Default,
20
21
  updated: DebugMessage.Default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micro-lc/preview",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "module": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -21,17 +21,17 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@micro-lc/composer": "^2.0.3",
24
- "es-module-shims": "^1.7.0",
24
+ "es-module-shims": "^1.7.1",
25
25
  "rxjs": "^7.8.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@micro-lc/back-kit-engine": "^0.20.7",
28
+ "@micro-lc/back-kit-engine": "^0.20.10",
29
29
  "@micro-lc/interfaces": "^1.0.2",
30
- "@playwright/test": "^1.31.2",
31
- "@types/node": "^18.15.1",
30
+ "@playwright/test": "^1.32.2",
31
+ "@types/node": "^18.15.11",
32
32
  "npm-run-all": "^4.1.5",
33
- "typescript": "^4.9.5",
34
- "vite": "^4.1.4"
33
+ "typescript": "^5.0.3",
34
+ "vite": "^4.2.1"
35
35
  },
36
36
  "engines": {
37
37
  "node": ">=16.17.0"
@@ -0,0 +1,13 @@
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();var zi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){const n=typeof window<"u",e=typeof document<"u",t=()=>{},r=e?document.querySelector("script[type=esms-options]"):void 0,s=r?JSON.parse(r.innerHTML):{};Object.assign(s,self.esmsInitOptions||{});let o=e?!!s.shimMode:!0;const c=N(o&&s.onimport),h=N(o&&s.resolve);let f=s.fetch?N(s.fetch):fetch;const d=s.meta?N(o&&s.meta):t,$=s.mapOverrides;let w=s.nonce;if(!w&&e){const l=document.querySelector("script[nonce]");l&&(w=l.nonce||l.getAttribute("nonce"))}const S=N(s.onerror||t),C=s.onpolyfill?N(s.onpolyfill):()=>{console.log("%c^^ Module TypeError above is polyfilled and can be ignored ^^","font-weight:900;color:#391")},{revokeBlobURLs:R,noLoadEventRetriggers:I,enforceIntegrity:q}=s;function N(l){return typeof l=="string"?self[l]:l}const j=Array.isArray(s.polyfillEnable)?s.polyfillEnable:[],F=j.includes("css-modules"),V=j.includes("json-modules"),ut=!navigator.userAgentData&&!!navigator.userAgent.match(/Edge\/\d+\.\d+/),re=e?document.baseURI:`${location.protocol}//${location.host}${location.pathname.includes("/")?location.pathname.slice(0,location.pathname.lastIndexOf("/")+1):location.pathname}`,J=(l,p="text/javascript")=>URL.createObjectURL(new Blob([l],{type:p}));let{skip:pe}=s;if(Array.isArray(pe)){const l=pe.map(p=>new URL(p,re).href);pe=p=>l.some(b=>b[b.length-1]==="/"&&p.startsWith(b)||p===b)}else if(typeof pe=="string"){const l=new RegExp(pe);pe=p=>l.test(p)}const ci=l=>setTimeout(()=>{throw l}),It=l=>{(self.reportError||n&&window.safari&&console.error||ci)(l),S(l)};function Be(l){return l?` imported from ${l}`:""}let ft=!1;function li(){ft=!0}if(!o)if(document.querySelectorAll("script[type=module-shim],script[type=importmap-shim],link[rel=modulepreload-shim]").length)o=!0;else{let l=!1;for(const p of document.querySelectorAll("script[type=module],script[type=importmap]"))if(!l)p.type==="module"&&!p.ep&&(l=!0);else if(p.type==="importmap"&&l){ft=!0;break}}const ui=/\\/g;function Ct(l){if(l.indexOf(":")===-1)return!1;try{return new URL(l),!0}catch{return!1}}function yn(l,p){return _e(l,p)||(Ct(l)?l:_e("./"+l,p))}function _e(l,p){const b=p.indexOf("#"),A=p.indexOf("?");if(b+A>-2&&(p=p.slice(0,b===-1?A:A===-1||A>b?b:A)),l.indexOf("\\")!==-1&&(l=l.replace(ui,"/")),l[0]==="/"&&l[1]==="/")return p.slice(0,p.indexOf(":")+1)+l;if(l[0]==="."&&(l[1]==="/"||l[1]==="."&&(l[2]==="/"||l.length===2&&(l+="/"))||l.length===1&&(l+="/"))||l[0]==="/"){const g=p.slice(0,p.indexOf(":")+1);let k;if(p[g.length+1]==="/"?g!=="file:"?(k=p.slice(g.length+2),k=k.slice(k.indexOf("/")+1)):k=p.slice(8):k=p.slice(g.length+(p[g.length]==="/")),l[0]==="/")return p.slice(0,p.length-k.length-1)+l;const x=k.slice(0,k.lastIndexOf("/")+1)+l,O=[];let L=-1;for(let E=0;E<x.length;E++){if(L!==-1){x[E]==="/"&&(O.push(x.slice(L,E+1)),L=-1);continue}else if(x[E]==="."){if(x[E+1]==="."&&(x[E+2]==="/"||E+2===x.length)){O.pop(),E+=2;continue}else if(x[E+1]==="/"||E+1===x.length){E+=1;continue}}for(;x[E]==="/";)E++;L=E}return L!==-1&&O.push(x.slice(L)),p.slice(0,p.length-k.length)+O.join("")}}function _n(l,p,b){const A={imports:Object.assign({},b.imports),scopes:Object.assign({},b.scopes)};if(l.imports&&gn(l.imports,A.imports,p,b),l.scopes)for(let g in l.scopes){const k=yn(g,p);gn(l.scopes[g],A.scopes[k]||(A.scopes[k]={}),p,b)}return A}function Tt(l,p){if(p[l])return l;let b=l.length;do{const A=l.slice(0,b+1);if(A in p)return A}while((b=l.lastIndexOf("/",b-1))!==-1)}function wn(l,p){const b=Tt(l,p);if(b){const A=p[b];return A===null?void 0:A+l.slice(b.length)}}function Lt(l,p,b){let A=b&&Tt(b,l.scopes);for(;A;){const g=wn(p,l.scopes[A]);if(g)return g;A=Tt(A.slice(0,A.lastIndexOf("/")),l.scopes)}return wn(p,l.imports)||p.indexOf(":")!==-1&&p}function gn(l,p,b,A){for(let g in l){const k=_e(g,b)||g;if((!o||!$)&&p[k]&&p[k]!==l[k])throw Error(`Rejected map override "${k}" from ${p[k]} to ${l[k]}.`);let x=l[g];if(typeof x!="string")continue;const O=Lt(A,_e(x,b)||x,b);if(O){p[k]=O;continue}console.warn(`Mapping "${g}" -> "${l[g]}" does not resolve`)}}let ae=!e&&(0,eval)("u=>import(u)"),We;const fi=e&&new Promise(l=>{const p=Object.assign(document.createElement("script"),{src:J("self._d=u=>import(u)"),ep:!0});p.setAttribute("nonce",w),p.addEventListener("load",()=>{if(!(We=!!(ae=self._d))){let b;window.addEventListener("error",A=>b=A),ae=(A,g)=>new Promise((k,x)=>{const O=Object.assign(document.createElement("script"),{type:"module",src:J(`import*as m from'${A}';self._esmsi=m`)});b=void 0,O.ep=!0,w&&O.setAttribute("nonce",w),O.addEventListener("error",L),O.addEventListener("load",L);function L(E){document.head.removeChild(O),self._esmsi?(k(self._esmsi,re),self._esmsi=void 0):(x(!(E instanceof Event)&&E||b&&b.error||new Error(`Error loading ${g&&g.errUrl||A} (${O.src}).`)),b=void 0)}document.head.appendChild(O)})}document.head.removeChild(p),delete self._d,l()}),document.head.appendChild(p)});let ht=!1,dt=!1;const Pt=e&&HTMLScriptElement.supports;let Oe=Pt&&Pt.name==="supports"&&Pt("importmap"),pt=We;const $n="import.meta",kn='import"x"assert{type:"css"}',hi='import"x"assert{type:"json"}';let di=Promise.resolve(fi).then(()=>{if(We)return e?new Promise(l=>{const p=document.createElement("iframe");p.style.display="none",p.setAttribute("nonce",w);function b({data:O}){Array.isArray(O)&&(Oe=O[0],pt=O[1],dt=O[2],ht=O[3]),l(),document.head.removeChild(p),window.removeEventListener("message",b,!1)}window.addEventListener("message",b,!1);const A=`<script nonce=${w||""}>b=(s,type='text/javascript')=>URL.createObjectURL(new Blob([s],{type}));document.head.appendChild(Object.assign(document.createElement('script'),{type:'importmap',nonce:"${w}",innerText:\`{"imports":{"x":"\${b('')}"}}\`}));Promise.all([${Oe?"true,true":`'x',b('${$n}')`}, ${F?`b('${kn}'.replace('x',b('','text/css')))`:"false"}, ${V?`b('${hi}'.replace('x',b('{}','text/json')))`:"false"}].map(x =>typeof x==='string'?import(x).then(x =>!!x,()=>false):x)).then(a=>parent.postMessage(a,'*'))<\/script>`;let g=!1,k=!1;function x(){if(!g){k=!0;return}const O=p.contentDocument;if(O&&O.head.childNodes.length===0){const L=O.createElement("script");w&&L.setAttribute("nonce",w),L.innerHTML=A.slice(15+(w?w.length:0),-9),O.head.appendChild(L)}}p.onload=x,document.head.appendChild(p),g=!0,"srcdoc"in p?p.srcdoc=A:p.contentDocument.write(A),k&&x()}):Promise.all([Oe||ae(J($n)).then(()=>pt=!0,t),F&&ae(J(kn.replace("x",J("","text/css")))).then(()=>dt=!0,t),V&&ae(J(jsonModulescheck.replace("x",J("{}","text/json")))).then(()=>ht=!0,t)])}),B,mt,Rt,De=2<<19;const An=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(l,p){const b=l.length;let A=0;for(;A<b;)p[A]=l.charCodeAt(A++)}:function(l,p){const b=l.length;let A=0;for(;A<b;){const g=l.charCodeAt(A);p[A++]=(255&g)<<8|g>>>8}},pi="xportmportlassetaromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileforifcatcfinallels";let U,Sn,M;function mi(l,p="@"){U=l,Sn=p;const b=2*U.length+(2<<18);if(b>De||!B){for(;b>De;)De*=2;mt=new ArrayBuffer(De),An(pi,new Uint16Array(mt,16,105)),B=function(x,O,L){var E=new x.Int8Array(L),_=new x.Int16Array(L),a=new x.Int32Array(L),ne=new x.Uint8Array(L),ce=new x.Uint16Array(L),ee=1024;function Y(){var i=0,u=0,m=0,y=0,v=0,T=0,ve=0;ve=ee,ee=ee+10240|0,E[795]=1,_[395]=0,_[396]=0,a[67]=a[2],E[796]=0,a[66]=0,E[794]=0,a[68]=ve+2048,a[69]=ve,E[797]=0,i=(a[3]|0)+-2|0,a[70]=i,u=i+(a[64]<<1)|0,a[71]=u;e:for(;;){if(m=i+2|0,a[70]=m,i>>>0>=u>>>0){v=18;break}n:do switch(_[m>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(_[396]|0)&&Qe(m)|0&&!(K(i+4|0,16,10)|0)&&(ge(),(E[795]|0)==0)){v=9;break e}else v=17;break}case 105:{Qe(m)|0&&!(K(i+4|0,26,10)|0)&&Ke(),v=17;break}case 59:{v=17;break}case 47:switch(_[i+4>>1]|0){case 47:{zt();break n}case 42:{Gt(1);break n}default:{v=16;break e}}default:{v=16;break e}}while(0);(v|0)==17&&(v=0,a[67]=a[70]),i=a[70]|0,u=a[71]|0}(v|0)==9?(i=a[70]|0,a[67]=i,v=19):(v|0)==16?(E[795]=0,a[70]=i,v=19):(v|0)==18&&(E[794]|0?i=0:(i=m,v=19));do if((v|0)==19){e:for(;;){if(u=i+2|0,a[70]=u,y=u,i>>>0>=(a[71]|0)>>>0){v=82;break}n:do switch(_[u>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(_[396]|0)&&Qe(u)|0&&!(K(i+4|0,16,10)|0)&&ge(),v=81;break}case 105:{Qe(u)|0&&!(K(i+4|0,26,10)|0)&&Ke(),v=81;break}case 99:{Qe(u)|0&&!(K(i+4|0,36,8)|0)&&Xe(_[i+12>>1]|0)|0&&(E[797]=1),v=81;break}case 40:{y=a[68]|0,u=_[396]|0,v=u&65535,a[y+(v<<3)>>2]=1,m=a[67]|0,_[396]=u+1<<16>>16,a[y+(v<<3)+4>>2]=m,v=81;break}case 41:{if(u=_[396]|0,!(u<<16>>16)){v=36;break e}u=u+-1<<16>>16,_[396]=u,m=_[395]|0,m<<16>>16&&(T=a[(a[69]|0)+((m&65535)+-1<<2)>>2]|0,(a[T+20>>2]|0)==(a[(a[68]|0)+((u&65535)<<3)+4>>2]|0))&&(u=T+4|0,a[u>>2]|0||(a[u>>2]=y),a[T+12>>2]=i+4,_[395]=m+-1<<16>>16),v=81;break}case 123:{v=a[67]|0,y=a[61]|0,i=v;do if((_[v>>1]|0)==41&(y|0)!=0&&(a[y+4>>2]|0)==(v|0))if(u=a[62]|0,a[61]=u,u){a[u+28>>2]=0;break}else{a[57]=0;break}while(0);y=a[68]|0,m=_[396]|0,v=m&65535,a[y+(v<<3)>>2]=E[797]|0?6:2,_[396]=m+1<<16>>16,a[y+(v<<3)+4>>2]=i,E[797]=0,v=81;break}case 125:{if(i=_[396]|0,!(i<<16>>16)){v=49;break e}y=a[68]|0,v=i+-1<<16>>16,_[396]=v,(a[y+((v&65535)<<3)>>2]|0)==4&&Ce(),v=81;break}case 39:{Q(39),v=81;break}case 34:{Q(34),v=81;break}case 47:switch(_[i+4>>1]|0){case 47:{zt();break n}case 42:{Gt(1);break n}default:{i=a[67]|0,y=_[i>>1]|0;t:do if(Ei(y)|0)switch(y<<16>>16){case 46:if(((_[i+-2>>1]|0)+-48&65535)<10){v=66;break t}else{v=69;break t}case 43:if((_[i+-2>>1]|0)==43){v=66;break t}else{v=69;break t}case 45:if((_[i+-2>>1]|0)==45){v=66;break t}else{v=69;break t}default:{v=69;break t}}else{switch(y<<16>>16){case 41:if(Ti(a[(a[68]|0)+(ce[396]<<3)+4>>2]|0)|0){v=69;break t}else{v=66;break t}case 125:break;default:{v=66;break t}}u=a[68]|0,m=ce[396]|0,!(xi(a[u+(m<<3)+4>>2]|0)|0)&&(a[u+(m<<3)>>2]|0)!=6?v=66:v=69}while(0);t:do if((v|0)==66)if(v=0,$e(i)|0)v=69;else{switch(y<<16>>16){case 0:{v=69;break t}case 47:{if(E[796]|0){v=69;break t}break}default:}m=a[3]|0,u=y;do{if(i>>>0<=m>>>0)break;i=i+-2|0,a[67]=i,u=_[i>>1]|0}while(!(Yt(u)|0));if(_t(u)|0){do{if(i>>>0<=m>>>0)break;i=i+-2|0,a[67]=i}while(_t(_[i>>1]|0)|0);if(Ii(i)|0){zn(),E[796]=0,v=81;break n}else i=1}else i=1}while(0);(v|0)==69&&(zn(),i=0),E[796]=i,v=81;break n}}case 96:{y=a[68]|0,m=_[396]|0,v=m&65535,a[y+(v<<3)+4>>2]=a[67],_[396]=m+1<<16>>16,a[y+(v<<3)>>2]=3,Ce(),v=81;break}default:v=81}while(0);(v|0)==81&&(v=0,a[67]=a[70]),i=a[70]|0}if((v|0)==36){X(),i=0;break}else if((v|0)==49){X(),i=0;break}else if((v|0)==82){i=E[794]|0?0:(_[395]|_[396])<<16>>16==0;break}}while(0);return ee=ve,i|0}function ge(){var i=0,u=0,m=0,y=0,v=0,T=0,ve=0,Ae=0,Kt=0,Jt=0,Qt=0,Xt=0,H=0,W=0;Ae=a[70]|0,Kt=a[63]|0,W=Ae+12|0,a[70]=W,m=P(1)|0,i=a[70]|0,(i|0)==(W|0)&&!(yt(m)|0)||(H=3);e:do if((H|0)==3){n:do switch(m<<16>>16){case 123:{for(a[70]=i+2,i=P(1)|0,m=a[70]|0;;){if(Ze(i)|0?(Q(i),i=(a[70]|0)+2|0,a[70]=i):(ke(i)|0,i=a[70]|0),P(1)|0,i=Yn(m,i)|0,i<<16>>16==44&&(a[70]=(a[70]|0)+2,i=P(1)|0),u=m,m=a[70]|0,i<<16>>16==125){H=15;break}if((m|0)==(u|0)){H=12;break}if(m>>>0>(a[71]|0)>>>0){H=14;break}}if((H|0)==12){X();break e}else if((H|0)==14){X();break e}else if((H|0)==15){a[70]=m+2;break n}break}case 42:{a[70]=i+2,P(1)|0,W=a[70]|0,Yn(W,W)|0;break}default:{switch(E[795]=0,m<<16>>16){case 100:{switch(Ae=i+14|0,a[70]=Ae,(P(1)|0)<<16>>16){case 97:{u=a[70]|0,!(K(u+2|0,56,8)|0)&&(v=u+10|0,_t(_[v>>1]|0)|0)&&(a[70]=v,P(0)|0,H=22);break}case 102:{H=22;break}case 99:{u=a[70]|0,!(K(u+2|0,36,8)|0)&&(y=u+10|0,W=_[y>>1]|0,Xe(W)|0|W<<16>>16==123)&&(a[70]=y,T=P(1)|0,T<<16>>16!=123)&&(Xt=T,H=31);break}default:}t:do if((H|0)==22&&(ve=a[70]|0,(K(ve+2|0,64,14)|0)==0)){if(m=ve+16|0,u=_[m>>1]|0,!(Xe(u)|0))switch(u<<16>>16){case 40:case 42:break;default:break t}a[70]=m,u=P(1)|0,u<<16>>16==42&&(a[70]=(a[70]|0)+2,u=P(1)|0),u<<16>>16!=40&&(Xt=u,H=31)}while(0);if((H|0)==31&&(Jt=a[70]|0,ke(Xt)|0,Qt=a[70]|0,Qt>>>0>Jt>>>0)){Te(i,Ae,Jt,Qt),a[70]=(a[70]|0)+-2;break e}Te(i,Ae,0,0),a[70]=i+12;break e}case 97:{a[70]=i+10,P(0)|0,i=a[70]|0,H=35;break}case 102:{H=35;break}case 99:{if(!(K(i+2|0,36,8)|0)&&(u=i+10|0,Yt(_[u>>1]|0)|0)){a[70]=u,W=P(1)|0,H=a[70]|0,ke(W)|0,W=a[70]|0,Te(H,W,H,W),a[70]=(a[70]|0)+-2;break e}i=i+4|0,a[70]=i;break}case 108:case 118:break;default:break e}if((H|0)==35){a[70]=i+16,i=P(1)|0,i<<16>>16==42&&(a[70]=(a[70]|0)+2,i=P(1)|0),H=a[70]|0,ke(i)|0,W=a[70]|0,Te(H,W,H,W),a[70]=(a[70]|0)+-2;break e}i=i+4|0,a[70]=i,E[795]=0;t:for(;;){switch(a[70]=i+2,W=P(1)|0,i=a[70]|0,(ke(W)|0)<<16>>16){case 91:case 123:break t;default:}if(u=a[70]|0,(u|0)==(i|0))break e;if(Te(i,u,i,u),(P(1)|0)<<16>>16!=44)break;i=a[70]|0}a[70]=(a[70]|0)+-2;break e}}while(0);if(W=(P(1)|0)<<16>>16==102,i=a[70]|0,W&&!(K(i+2|0,50,6)|0))for(a[70]=i+8,ie(Ae,P(1)|0),i=Kt|0?Kt+16|0:232;;){if(i=a[i>>2]|0,!i)break e;a[i+12>>2]=0,a[i+8>>2]=0,i=i+16|0}a[70]=i+-2}while(0)}function Ke(){var i=0,u=0,m=0,y=0,v=0,T=0;v=a[70]|0,i=v+12|0,a[70]=i;e:do switch((P(1)|0)<<16>>16){case 40:{if(u=a[68]|0,T=_[396]|0,m=T&65535,a[u+(m<<3)>>2]=5,i=a[70]|0,_[396]=T+1<<16>>16,a[u+(m<<3)+4>>2]=i,(_[a[67]>>1]|0)!=46){switch(a[70]=i+2,T=P(1)|0,Vt(v,a[70]|0,0,i),u=a[61]|0,m=a[69]|0,v=_[395]|0,_[395]=v+1<<16>>16,a[m+((v&65535)<<2)>>2]=u,T<<16>>16){case 39:{Q(39);break}case 34:{Q(34);break}default:{a[70]=(a[70]|0)+-2;break e}}switch(i=(a[70]|0)+2|0,a[70]=i,(P(1)|0)<<16>>16){case 44:{a[70]=(a[70]|0)+2,P(1)|0,v=a[61]|0,a[v+4>>2]=i,T=a[70]|0,a[v+16>>2]=T,E[v+24>>0]=1,a[70]=T+-2;break e}case 41:{_[396]=(_[396]|0)+-1<<16>>16,T=a[61]|0,a[T+4>>2]=i,a[T+12>>2]=(a[70]|0)+2,E[T+24>>0]=1,_[395]=(_[395]|0)+-1<<16>>16;break e}default:{a[70]=(a[70]|0)+-2;break e}}}break}case 46:{if(a[70]=(a[70]|0)+2,(P(1)|0)<<16>>16==109&&(u=a[70]|0,(K(u+2|0,44,6)|0)==0)){if(i=a[67]|0,!(Jn(i)|0)&&(_[i>>1]|0)==46)break e;Vt(v,v,u+8|0,2)}break}case 42:case 39:case 34:{y=18;break}case 123:{if(i=a[70]|0,_[396]|0){a[70]=i+-2;break e}for(;!(i>>>0>=(a[71]|0)>>>0);){if(i=P(1)|0,Ze(i)|0)Q(i);else if(i<<16>>16==125){y=33;break}i=(a[70]|0)+2|0,a[70]=i}if((y|0)==33&&(a[70]=(a[70]|0)+2),T=(P(1)|0)<<16>>16==102,i=a[70]|0,T&&K(i+2|0,50,6)|0){X();break e}if(a[70]=i+8,i=P(1)|0,Ze(i)|0){ie(v,i);break e}else{X();break e}}default:(a[70]|0)==(i|0)?a[70]=v+10:y=18}while(0);do if((y|0)==18){if(_[396]|0){a[70]=(a[70]|0)+-2;break}for(i=a[71]|0,u=a[70]|0;;){if(u>>>0>=i>>>0){y=25;break}if(m=_[u>>1]|0,Ze(m)|0){y=23;break}T=u+2|0,a[70]=T,u=T}if((y|0)==23){ie(v,m);break}else if((y|0)==25){X();break}}while(0)}function ie(i,u){i=i|0,u=u|0;var m=0,y=0;switch(m=(a[70]|0)+2|0,u<<16>>16){case 39:{Q(39),y=5;break}case 34:{Q(34),y=5;break}default:X()}do if((y|0)==5){if(Vt(i,m,a[70]|0,1),a[70]=(a[70]|0)+2,u=P(0)|0,i=u<<16>>16==97,i?(m=a[70]|0,K(m+2|0,78,10)|0&&(y=11)):(m=a[70]|0,u<<16>>16==119&&(_[m+2>>1]|0)==105&&(_[m+4>>1]|0)==116&&(_[m+6>>1]|0)==104||(y=11)),(y|0)==11){a[70]=m+-2;break}if(a[70]=m+((i?6:4)<<1),(P(1)|0)<<16>>16!=123){a[70]=m;break}i=a[70]|0,u=i;e:for(;;){switch(a[70]=u+2,u=P(1)|0,u<<16>>16){case 39:{Q(39),a[70]=(a[70]|0)+2,u=P(1)|0;break}case 34:{Q(34),a[70]=(a[70]|0)+2,u=P(1)|0;break}default:u=ke(u)|0}if(u<<16>>16!=58){y=20;break}switch(a[70]=(a[70]|0)+2,(P(1)|0)<<16>>16){case 39:{Q(39);break}case 34:{Q(34);break}default:{y=24;break e}}switch(a[70]=(a[70]|0)+2,(P(1)|0)<<16>>16){case 125:{y=29;break e}case 44:break;default:{y=28;break e}}if(a[70]=(a[70]|0)+2,(P(1)|0)<<16>>16==125){y=29;break}u=a[70]|0}if((y|0)==20){a[70]=m;break}else if((y|0)==24){a[70]=m;break}else if((y|0)==28){a[70]=m;break}else if((y|0)==29){y=a[61]|0,a[y+16>>2]=i,a[y+12>>2]=(a[70]|0)+2;break}}while(0)}function $e(i){i=i|0;e:do switch(_[i>>1]|0){case 100:switch(_[i+-2>>1]|0){case 105:{i=G(i+-4|0,88,2)|0;break e}case 108:{i=G(i+-4|0,92,3)|0;break e}default:{i=0;break e}}case 101:switch(_[i+-2>>1]|0){case 115:switch(_[i+-4>>1]|0){case 108:{i=Je(i+-6|0,101)|0;break e}case 97:{i=Je(i+-6|0,99)|0;break e}default:{i=0;break e}}case 116:{i=G(i+-4|0,98,4)|0;break e}case 117:{i=G(i+-4|0,106,6)|0;break e}default:{i=0;break e}}case 102:{if((_[i+-2>>1]|0)==111&&(_[i+-4>>1]|0)==101)switch(_[i+-6>>1]|0){case 99:{i=G(i+-8|0,118,6)|0;break e}case 112:{i=G(i+-8|0,130,2)|0;break e}default:{i=0;break e}}else i=0;break}case 107:{i=G(i+-2|0,134,4)|0;break}case 110:{i=i+-2|0,Je(i,105)|0?i=1:i=G(i,142,5)|0;break}case 111:{i=Je(i+-2|0,100)|0;break}case 114:{i=G(i+-2|0,152,7)|0;break}case 116:{i=G(i+-2|0,166,4)|0;break}case 119:switch(_[i+-2>>1]|0){case 101:{i=Je(i+-4|0,110)|0;break e}case 111:{i=G(i+-4|0,174,3)|0;break e}default:{i=0;break e}}default:i=0}while(0);return i|0}function Ce(){var i=0,u=0,m=0,y=0;u=a[71]|0,m=a[70]|0;e:for(;;){if(i=m+2|0,m>>>0>=u>>>0){u=10;break}switch(_[i>>1]|0){case 96:{u=7;break e}case 36:{if((_[m+4>>1]|0)==123){u=6;break e}break}case 92:{i=m+4|0;break}default:}m=i}(u|0)==6?(i=m+4|0,a[70]=i,u=a[68]|0,y=_[396]|0,m=y&65535,a[u+(m<<3)>>2]=4,_[396]=y+1<<16>>16,a[u+(m<<3)+4>>2]=i):(u|0)==7?(a[70]=i,m=a[68]|0,y=(_[396]|0)+-1<<16>>16,_[396]=y,(a[m+((y&65535)<<3)>>2]|0)!=3&&X()):(u|0)==10&&(a[70]=i,X())}function P(i){i=i|0;var u=0,m=0,y=0;m=a[70]|0;e:do{u=_[m>>1]|0;n:do if(u<<16>>16!=47)if(i){if(Xe(u)|0)break;break e}else{if(_t(u)|0)break;break e}else switch(_[m+2>>1]|0){case 47:{zt();break n}case 42:{Gt(i);break n}default:{u=47;break e}}while(0);y=a[70]|0,m=y+2|0,a[70]=m}while(y>>>0<(a[71]|0)>>>0);return u|0}function Q(i){i=i|0;var u=0,m=0,y=0,v=0;for(v=a[71]|0,u=a[70]|0;;){if(y=u+2|0,u>>>0>=v>>>0){u=9;break}if(m=_[y>>1]|0,m<<16>>16==i<<16>>16){u=10;break}if(m<<16>>16==92)m=u+4|0,(_[m>>1]|0)==13?(u=u+6|0,u=(_[u>>1]|0)==10?u:m):u=m;else if(Qn(m)|0){u=9;break}else u=y}(u|0)==9?(a[70]=y,X()):(u|0)==10&&(a[70]=y)}function Yn(i,u){i=i|0,u=u|0;var m=0,y=0,v=0,T=0;return m=a[70]|0,y=_[m>>1]|0,T=(i|0)==(u|0),v=T?0:i,T=T?0:u,y<<16>>16==97&&(a[70]=m+4,m=P(1)|0,i=a[70]|0,Ze(m)|0?(Q(m),u=(a[70]|0)+2|0,a[70]=u):(ke(m)|0,u=a[70]|0),y=P(1)|0,m=a[70]|0),(m|0)!=(i|0)&&Te(i,u,v,T),y|0}function Vt(i,u,m,y){i=i|0,u=u|0,m=m|0,y=y|0;var v=0,T=0;v=a[65]|0,a[65]=v+32,T=a[61]|0,a[(T|0?T+28|0:228)>>2]=v,a[62]=T,a[61]=v,a[v+8>>2]=i,(y|0)==2?i=m:i=(y|0)==1?m+2|0:0,a[v+12>>2]=i,a[v>>2]=u,a[v+4>>2]=m,a[v+16>>2]=0,a[v+20>>2]=y,E[v+24>>0]=(y|0)==1&1,a[v+28>>2]=0}function Si(){var i=0,u=0,m=0;m=a[71]|0,u=a[70]|0;e:for(;;){if(i=u+2|0,u>>>0>=m>>>0){u=6;break}switch(_[i>>1]|0){case 13:case 10:{u=6;break e}case 93:{u=7;break e}case 92:{i=u+4|0;break}default:}u=i}return(u|0)==6?(a[70]=i,X(),i=0):(u|0)==7&&(a[70]=i,i=93),i|0}function zn(){var i=0,u=0,m=0;e:for(;;){if(i=a[70]|0,u=i+2|0,a[70]=u,i>>>0>=(a[71]|0)>>>0){m=7;break}switch(_[u>>1]|0){case 13:case 10:{m=7;break e}case 47:break e;case 91:{Si()|0;break}case 92:{a[70]=i+4;break}default:}}(m|0)==7&&X()}function xi(i){switch(i=i|0,_[i>>1]|0){case 62:{i=(_[i+-2>>1]|0)==61;break}case 41:case 59:{i=1;break}case 104:{i=G(i+-2|0,200,4)|0;break}case 121:{i=G(i+-2|0,208,6)|0;break}case 101:{i=G(i+-2|0,220,3)|0;break}default:i=0}return i|0}function Gt(i){i=i|0;var u=0,m=0,y=0,v=0,T=0;for(v=(a[70]|0)+2|0,a[70]=v,m=a[71]|0;u=v+2|0,!(v>>>0>=m>>>0||(y=_[u>>1]|0,!i&&Qn(y)|0));){if(y<<16>>16==42&&(_[v+4>>1]|0)==47){T=8;break}v=u}(T|0)==8&&(a[70]=u,u=v+4|0),a[70]=u}function K(i,u,m){i=i|0,u=u|0,m=m|0;var y=0,v=0;e:do if(!m)i=0;else{for(;y=E[i>>0]|0,v=E[u>>0]|0,y<<24>>24==v<<24>>24;)if(m=m+-1|0,m)i=i+1|0,u=u+1|0;else{i=0;break e}i=(y&255)-(v&255)|0}while(0);return i|0}function yt(i){i=i|0;e:do switch(i<<16>>16){case 38:case 37:case 33:{i=1;break}default:if((i&-8)<<16>>16==40|(i+-58&65535)<6)i=1;else{switch(i<<16>>16){case 91:case 93:case 94:{i=1;break e}default:}i=(i+-123&65535)<4}}while(0);return i|0}function Ei(i){i=i|0;e:do switch(i<<16>>16){case 38:case 37:case 33:break;default:if(!((i+-58&65535)<6|(i+-40&65535)<7&i<<16>>16!=41)){switch(i<<16>>16){case 91:case 94:break e;default:}return i<<16>>16!=125&(i+-123&65535)<4|0}}while(0);return 1}function Kn(i){i=i|0;var u=0;u=_[i>>1]|0;e:do if((u+-9&65535)>=5){switch(u<<16>>16){case 160:case 32:{u=1;break e}default:}if(yt(u)|0)return u<<16>>16!=46|(Jn(i)|0)|0;u=0}else u=1;while(0);return u|0}function Oi(i){i=i|0;var u=0,m=0,y=0,v=0;return m=ee,ee=ee+16|0,y=m,a[y>>2]=0,a[64]=i,u=a[3]|0,v=u+(i<<1)|0,i=v+2|0,_[v>>1]=0,a[y>>2]=i,a[65]=i,a[57]=0,a[61]=0,a[59]=0,a[58]=0,a[63]=0,a[60]=0,ee=m,u|0}function G(i,u,m){i=i|0,u=u|0,m=m|0;var y=0,v=0;return y=i+(0-m<<1)|0,v=y+2|0,i=a[3]|0,v>>>0>=i>>>0&&!(K(v,u,m<<1)|0)?(v|0)==(i|0)?i=1:i=Kn(y)|0:i=0,i|0}function Te(i,u,m,y){i=i|0,u=u|0,m=m|0,y=y|0;var v=0,T=0;v=a[65]|0,a[65]=v+20,T=a[63]|0,a[(T|0?T+16|0:232)>>2]=v,a[63]=v,a[v>>2]=i,a[v+4>>2]=u,a[v+8>>2]=m,a[v+12>>2]=y,a[v+16>>2]=0}function Ii(i){switch(i=i|0,_[i>>1]|0){case 107:{i=G(i+-2|0,134,4)|0;break}case 101:{(_[i+-2>>1]|0)==117?i=G(i+-4|0,106,6)|0:i=0;break}default:i=0}return i|0}function Je(i,u){i=i|0,u=u|0;var m=0;return m=a[3]|0,m>>>0<=i>>>0&&(_[i>>1]|0)==u<<16>>16?(m|0)==(i|0)?m=1:m=Yt(_[i+-2>>1]|0)|0:m=0,m|0}function Yt(i){i=i|0;e:do if((i+-9&65535)<5)i=1;else{switch(i<<16>>16){case 32:case 160:{i=1;break e}default:}i=i<<16>>16!=46&(yt(i)|0)}while(0);return i|0}function zt(){var i=0,u=0,m=0;i=a[71]|0,m=a[70]|0;e:for(;u=m+2|0,!(m>>>0>=i>>>0);)switch(_[u>>1]|0){case 13:case 10:break e;default:m=u}a[70]=u}function ke(i){for(i=i|0;!(Xe(i)|0||yt(i)|0);)if(i=(a[70]|0)+2|0,a[70]=i,i=_[i>>1]|0,!(i<<16>>16)){i=0;break}return i|0}function Ci(){var i=0;switch(i=a[(a[59]|0)+20>>2]|0,i|0){case 1:{i=-1;break}case 2:{i=-2;break}default:i=i-(a[3]|0)>>1}return i|0}function Ti(i){return i=i|0,!(G(i,180,5)|0)&&!(G(i,190,3)|0)?i=G(i,196,2)|0:i=1,i|0}function _t(i){switch(i=i|0,i<<16>>16){case 160:case 32:case 12:case 11:case 9:{i=1;break}default:i=0}return i|0}function Jn(i){return i=i|0,(_[i>>1]|0)==46&&(_[i+-2>>1]|0)==46?i=(_[i+-4>>1]|0)==46:i=0,i|0}function Qe(i){return i=i|0,(a[3]|0)==(i|0)?i=1:i=Kn(i+-2|0)|0,i|0}function Li(){var i=0;return i=a[(a[60]|0)+12>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Pi(){var i=0;return i=a[(a[59]|0)+12>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Ri(){var i=0;return i=a[(a[60]|0)+8>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function ji(){var i=0;return i=a[(a[59]|0)+16>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Mi(){var i=0;return i=a[(a[59]|0)+4>>2]|0,i?i=i-(a[3]|0)>>1:i=-1,i|0}function Ni(){var i=0;return i=a[59]|0,i=a[(i|0?i+28|0:228)>>2]|0,a[59]=i,(i|0)!=0|0}function Fi(){var i=0;return i=a[60]|0,i=a[(i|0?i+16|0:232)>>2]|0,a[60]=i,(i|0)!=0|0}function X(){E[794]=1,a[66]=(a[70]|0)-(a[3]|0)>>1,a[70]=(a[71]|0)+2}function Xe(i){return i=i|0,(i|128)<<16>>16==160|(i+-9&65535)<5|0}function Ze(i){return i=i|0,i<<16>>16==39|i<<16>>16==34|0}function Hi(){return(a[(a[59]|0)+8>>2]|0)-(a[3]|0)>>1|0}function Ui(){return(a[(a[60]|0)+4>>2]|0)-(a[3]|0)>>1|0}function Qn(i){return i=i|0,i<<16>>16==13|i<<16>>16==10|0}function Bi(){return(a[a[59]>>2]|0)-(a[3]|0)>>1|0}function Wi(){return(a[a[60]>>2]|0)-(a[3]|0)>>1|0}function Di(){return ne[(a[59]|0)+24>>0]|0|0}function qi(i){i=i|0,a[3]=i}function Vi(){return(E[795]|0)!=0|0}function Gi(){return a[66]|0}function Yi(i){return i=i|0,ee=i+992+15&-16,992}return{su:Yi,ai:ji,e:Gi,ee:Ui,ele:Li,els:Ri,es:Wi,f:Vi,id:Ci,ie:Mi,ip:Di,is:Bi,p:Y,re:Fi,ri:Ni,sa:Oi,se:Pi,ses:qi,ss:Hi}}(typeof self<"u"?self:zi,{},mt),Rt=B.su(De-(2<<17))}const A=U.length+1;B.ses(Rt),B.sa(A-1),An(U,new Uint16Array(mt,Rt,A)),B.p()||(M=B.e(),me());const g=[],k=[];for(;B.ri();){const x=B.is(),O=B.ie(),L=B.ai(),E=B.id(),_=B.ss(),a=B.se();let ne;B.ip()&&(ne=jt(E===-1?x:x+1,U.charCodeAt(E===-1?x-1:x))),g.push({n:ne,s:x,e:O,ss:_,se:a,d:E,a:L})}for(;B.re();){const x=B.es(),O=B.ee(),L=B.els(),E=B.ele(),_=U.charCodeAt(x),a=L>=0?U.charCodeAt(L):-1;k.push({s:x,e:O,ls:L,le:E,n:_===34||_===39?jt(x+1,_):U.slice(x,O),ln:L<0?void 0:a===34||a===39?jt(L+1,a):U.slice(L,E)})}return[g,k,!!B.f()]}function jt(l,p){M=l;let b="",A=M;for(;;){M>=U.length&&me();const g=U.charCodeAt(M);if(g===p)break;g===92?(b+=U.slice(A,M),b+=vi(),A=M):(g===8232||g===8233||xn(g)&&me(),++M)}return b+=U.slice(A,M++),b}function vi(){let l=U.charCodeAt(++M);switch(++M,l){case 110:return`
2
+ `;case 114:return"\r";case 120:return String.fromCharCode(Mt(2));case 117:return function(){const p=U.charCodeAt(M);let b;return p===123?(++M,b=Mt(U.indexOf("}",M)-M),++M,b>1114111&&me()):b=Mt(4),b<=65535?String.fromCharCode(b):(b-=65536,String.fromCharCode(55296+(b>>10),56320+(1023&b)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:U.charCodeAt(M)===10&&++M;case 10:return"";case 56:case 57:me();default:if(l>=48&&l<=55){let p=U.substr(M-1,3).match(/^[0-7]+/)[0],b=parseInt(p,8);return b>255&&(p=p.slice(0,-1),b=parseInt(p,8)),M+=p.length-1,l=U.charCodeAt(M),p==="0"&&l!==56&&l!==57||me(),String.fromCharCode(b)}return xn(l)?"":String.fromCharCode(l)}}function Mt(l){const p=M;let b=0,A=0;for(let g=0;g<l;++g,++M){let k,x=U.charCodeAt(M);if(x!==95){if(x>=97)k=x-97+10;else if(x>=65)k=x-65+10;else{if(!(x>=48&&x<=57))break;k=x-48}if(k>=16)break;A=x,b=16*b+k}else A!==95&&g!==0||me(),A=x}return A!==95&&M-p===l||me(),b}function xn(l){return l===13||l===10}function me(){throw Object.assign(Error(`Parse error ${Sn}:${U.slice(0,M).split(`
3
+ `).length}:${M-U.lastIndexOf(`
4
+ `,M-1)}`),{idx:M})}async function En(l,p){const b=_e(l,p);return{r:Lt(we,b||l,p)||In(l,p),b:!b&&!Ct(l)}}const On=h?async(l,p)=>{let b=h(l,p,Nt);return b&&b.then&&(b=await b),b?{r:b,b:!_e(l,p)&&!Ct(l)}:En(l,p)}:En;async function qe(l,...p){let b=p[p.length-1];return typeof b!="string"&&(b=re),await Ge,c&&await c(l,typeof p[1]!="string"?p[1]:{},b),(Ye||o||!Ie)&&(e&&Ut(!0),o||(Ye=!1)),await vt,Pn((await On(l,b)).r,{credentials:"same-origin"})}self.importShim=qe;function Nt(l,p){return Lt(we,_e(l,p)||l,p)||In(l,p)}function In(l,p){throw Error(`Unable to resolve specifier '${l}'${Be(p)}`)}const Cn=(l,p=re)=>{p=`${p}`;const b=h&&h(l,p,Nt);return b&&!b.then?b:Nt(l,p)};function bi(l,p=this.url){return Cn(l,p)}qe.resolve=Cn,qe.getImportMap=()=>JSON.parse(JSON.stringify(we)),qe.addImportMap=l=>{if(!o)throw new Error("Unsupported in polyfill mode.");we=_n(l,re,we)};const Ve=qe._r={};async function Tn(l,p){l.b||p[l.u]||(p[l.u]=1,await l.L,await Promise.all(l.d.map(b=>Tn(b,p))),l.n||(l.n=l.d.some(b=>b.n)))}let we={imports:{},scopes:{}},Ie;const Ge=di.then(()=>{if(Ie=s.polyfillEnable!==!0&&We&&pt&&Oe&&(!V||ht)&&(!F||dt)&&!ft,e){if(!Oe){const l=HTMLScriptElement.supports||(p=>p==="classic"||p==="module");HTMLScriptElement.supports=p=>p==="importmap"||l(p)}if(o||!Ie)if(new MutationObserver(l=>{for(const p of l)if(p.type==="childList")for(const b of p.addedNodes)b.tagName==="SCRIPT"?(b.type===(o?"module-shim":"module")&&Vn(b,!0),b.type===(o?"importmap-shim":"importmap")&&qn(b,!0)):b.tagName==="LINK"&&b.rel===(o?"modulepreload-shim":"modulepreload")&&Gn(b)}).observe(document,{childList:!0,subtree:!0}),Ut(),document.readyState==="complete")Dt();else{async function l(){await Ge,Ut(),document.readyState==="complete"&&(Dt(),document.removeEventListener("readystatechange",l))}document.addEventListener("readystatechange",l)}}});let vt=Ge,Ln=!0,Ye=!0;async function Pn(l,p,b,A,g){if(o||(Ye=!1),await Ge,await vt,c&&await c(l,typeof p!="string"?p:{},""),!o&&Ie)return A?null:(await g,ae(b?J(b):l,{errUrl:l||b}));const k=Hn(l,p,null,b),x={};if(await Tn(k,x),bt=void 0,jn(k,x),await g,b&&!o&&!k.n)return A?void 0:(R&&Rn(Object.keys(x)),await ae(J(b),{errUrl:b}));Ln&&!o&&k.n&&A&&(C(),Ln=!1);const O=await ae(!o&&!k.n&&A?k.u:k.b,{errUrl:k.u});return k.s&&(await ae(k.s)).u$_(O),R&&Rn(Object.keys(x)),O}function Rn(l){let p=0;const b=l.length,A=self.requestIdleCallback?self.requestIdleCallback:self.requestAnimationFrame;A(g);function g(){const k=p*100;if(!(k>b)){for(const x of l.slice(k,k+100)){const O=Ve[x];O&&URL.revokeObjectURL(O.b)}p++,A(g)}}}function Ft(l){return`'${l.replace(/'/g,"\\'")}'`}let bt;function jn(l,p){if(l.b||!p[l.u])return;p[l.u]=0;for(const O of l.d)jn(O,p);const[b,A]=l.a,g=l.S;let k=ut&&bt?`import '${bt}';`:"";if(!b.length)k+=g;else{let _=function(a){for(;E[E.length-1]<a;){const ne=E.pop();k+=`${g.slice(O,ne)}, ${Ft(l.r)}`,O=ne}k+=g.slice(O,a),O=a},O=0,L=0,E=[];for(const{s:a,ss:ne,se:ce,d:ee}of b)if(ee===-1){let Y=l.d[L++],ge=Y.b,Ke=!ge;Ke&&((ge=Y.s)||(ge=Y.s=J(`export function u$_(m){${Y.a[1].map(({s:ie,e:$e},Ce)=>{const P=Y.S[ie]==='"'||Y.S[ie]==="'";return`e$_${Ce}=m${P?"[":"."}${Y.S.slice(ie,$e)}${P?"]":""}`}).join(",")}}${Y.a[1].length?`let ${Y.a[1].map((ie,$e)=>`e$_${$e}`).join(",")};`:""}export {${Y.a[1].map(({s:ie,e:$e},Ce)=>`e$_${Ce} as ${Y.S.slice(ie,$e)}`).join(",")}}
5
+ //# sourceURL=${Y.r}?cycle`))),_(a-1),k+=`/*${g.slice(a-1,ce)}*/${Ft(ge)}`,!Ke&&Y.s&&(k+=`;import*as m$_${L} from'${Y.b}';import{u$_ as u$_${L}}from'${Y.s}';u$_${L}(m$_${L})`,Y.s=void 0),O=ce}else ee===-2?(l.m={url:l.r,resolve:bi},d(l.m,l.u),_(a),k+=`importShim._r[${Ft(l.u)}].m`,O=ce):(_(ne+6),k+="Shim(",E.push(ce-1),O=a);l.s&&(k+=`
6
+ ;import{u$_}from'${l.s}';try{u$_({${A.filter(a=>a.ln).map(({s:a,e:ne,ln:ce})=>`${g.slice(a,ne)}:${ce}`).join(",")}})}catch(_){};
7
+ `),_(g.length)}let x=!1;k=k.replace(yi,(O,L,E)=>(x=!L,O.replace(E,()=>new URL(E,l.r)))),x||(k+=`
8
+ //# sourceURL=`+l.r),l.b=bt=J(k),l.S=void 0}const yi=/\n\/\/# source(Mapping)?URL=([^\n]+)\s*((;|\/\/[^#][^\n]*)\s*)*$/,_i=/^(text|application)\/(x-)?javascript(;|$)/,wi=/^(text|application)\/json(;|$)/,gi=/^(text|application)\/css(;|$)/,$i=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;let Ht=[],Mn=0;function ki(){if(++Mn>100)return new Promise(l=>Ht.push(l))}function Ai(){Mn--,Ht.length&&Ht.shift()()}async function Nn(l,p,b){if(q&&!p.integrity)throw Error(`No integrity for ${l}${Be(b)}.`);const A=ki();A&&await A;try{var g=await f(l,p)}catch(k){throw k.message=`Unable to fetch ${l}${Be(b)} - see network log for details.
9
+ `+k.message,k}finally{Ai()}if(!g.ok)throw Error(`${g.status} ${g.statusText} ${g.url}${Be(b)}`);return g}async function Fn(l,p,b){const A=await Nn(l,p,b),g=A.headers.get("content-type");if(_i.test(g))return{r:A.url,s:await A.text(),t:"js"};if(wi.test(g))return{r:A.url,s:`export default ${await A.text()}`,t:"json"};if(gi.test(g))return{r:A.url,s:`var s=new CSSStyleSheet();s.replaceSync(${JSON.stringify((await A.text()).replace($i,(k,x="",O,L)=>`url(${x}${yn(O||L,l)}${x})`))});export default s;`,t:"css"};throw Error(`Unsupported Content-Type "${g}" loading ${l}${Be(b)}. Modules must be served with a valid MIME type like application/javascript.`)}function Hn(l,p,b,A){let g=Ve[l];if(g&&!A)return g;if(g={u:l,r:A?l:void 0,f:void 0,S:void 0,L:void 0,a:void 0,d:void 0,b:void 0,s:void 0,n:!1,t:null,m:null},Ve[l]){let k=0;for(;Ve[g.u+ ++k];);g.u+=k}return Ve[g.u]=g,g.f=(async()=>{if(!A){let k;if({r:g.r,s:A,t:k}=await(qt[l]||Fn(l,p,b)),k&&!o){if(k==="css"&&!F||k==="json"&&!V)throw Error(`${k}-modules require <script type="esms-options">{ "polyfillEnable": ["${k}-modules"] }<\/script>`);(k==="css"&&!dt||k==="json"&&!ht)&&(g.n=!0)}}try{g.a=mi(A,g.u)}catch(k){It(k),g.a=[[],[],!1]}return g.S=A,g})(),g.L=g.f.then(async()=>{let k=p;g.d=(await Promise.all(g.a[0].map(async({n:x,d:O})=>{if((O>=0&&!We||O===-2&&!pt)&&(g.n=!0),O!==-1||!x)return;const{r:L,b:E}=await On(x,g.r||g.u);if(E&&(!Oe||ft)&&(g.n=!0),O===-1)return pe&&pe(L)?{b:L}:(k.integrity&&(k=Object.assign({},k,{integrity:void 0})),Hn(L,k,g.r).f)}))).filter(x=>x)}),g}function Ut(l=!1){if(!l)for(const p of document.querySelectorAll(o?"link[rel=modulepreload-shim]":"link[rel=modulepreload]"))Gn(p);for(const p of document.querySelectorAll(o?"script[type=importmap-shim]":"script[type=importmap]"))qn(p);if(!l)for(const p of document.querySelectorAll(o?"script[type=module-shim]":"script[type=module]"))Vn(p)}function Bt(l){const p={};return l.integrity&&(p.integrity=l.integrity),l.referrerPolicy&&(p.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?p.credentials="include":l.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}let Un=Promise.resolve(),Wt=1;function Bn(){--Wt===0&&!I&&(o||!Ie)&&document.dispatchEvent(new Event("DOMContentLoaded"))}e&&document.addEventListener("DOMContentLoaded",async()=>{await Ge,Bn()});let ze=1;function Dt(){--ze===0&&!I&&(o||!Ie)&&document.dispatchEvent(new Event("readystatechange"))}const Wn=l=>l.nextSibling||l.parentNode&&Wn(l.parentNode),Dn=(l,p)=>l.ep||!p&&(!l.src&&!l.innerHTML||!Wn(l))||l.getAttribute("noshim")!==null||!(l.ep=!0);function qn(l,p=ze>0){if(!Dn(l,p)){if(l.src){if(!o)return;li()}Ye&&(vt=vt.then(async()=>{we=_n(l.src?await(await Nn(l.src,Bt(l))).json():JSON.parse(l.innerHTML),l.src||re,we)}).catch(b=>{console.log(b),b instanceof SyntaxError&&(b=new Error(`Unable to parse import map ${b.message} in: ${l.src||l.innerHTML}`)),It(b)}),o||(Ye=!1))}}function Vn(l,p=ze>0){if(Dn(l,p))return;const b=l.getAttribute("async")===null&&ze>0,A=Wt>0;b&&ze++,A&&Wt++;const g=Pn(l.src||re,Bt(l),!l.src&&l.innerHTML,!o,b&&Un).then(()=>{o&&l.dispatchEvent(new Event("load"))}).catch(It);b&&(Un=g.then(Dt)),A&&g.then(Bn)}const qt={};function Gn(l){l.ep||(l.ep=!0,!qt[l.href]&&(qt[l.href]=Fn(l.href,Bt(l))))}})();var on=function(n,e){return on=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])},on(n,e)};function oe(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");on(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Ki(n,e,t,r){function s(o){return o instanceof t?o:new t(function(c){c(o)})}return new(t||(t=Promise))(function(o,c){function h($){try{d(r.next($))}catch(w){c(w)}}function f($){try{d(r.throw($))}catch(w){c(w)}}function d($){$.done?o($.value):s($.value).then(h,f)}d((r=r.apply(n,e||[])).next())})}function kr(n,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,s,o,c;return c={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function h(d){return function($){return f([d,$])}}function f(d){if(r)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(t=0)),t;)try{if(r=1,s&&(o=d[0]&2?s.return:d[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,d[1])).done)return o;switch(s=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,s=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){t.label=d[1];break}if(d[0]===6&&t.label<o[1]){t.label=o[1],o=d;break}if(o&&t.label<o[2]){t.label=o[2],t.ops.push(d);break}o[2]&&t.ops.pop(),t.trys.pop();continue}d=e.call(n,t)}catch($){d=[6,$],s=0}finally{r=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Ee(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],r=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function je(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),s,o=[],c;try{for(;(e===void 0||e-- >0)&&!(s=r.next()).done;)o.push(s.value)}catch(h){c={error:h}}finally{try{s&&!s.done&&(t=r.return)&&t.call(r)}finally{if(c)throw c.error}}return o}function Me(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return n.concat(o||Array.prototype.slice.call(e))}function Pe(n){return this instanceof Pe?(this.v=n,this):new Pe(n)}function Ji(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(n,e||[]),s,o=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(S){r[S]&&(s[S]=function(C){return new Promise(function(R,I){o.push([S,C,R,I])>1||h(S,C)})})}function h(S,C){try{f(r[S](C))}catch(R){w(o[0][3],R)}}function f(S){S.value instanceof Pe?Promise.resolve(S.value.v).then(d,$):w(o[0][2],S)}function d(S){h("next",S)}function $(S){h("throw",S)}function w(S,C){S(C),o.shift(),o.length&&h(o[0][0],o[0][1])}}function Qi(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof Ee=="function"?Ee(n):n[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=n[o]&&function(c){return new Promise(function(h,f){c=n[o](c),s(h,f,c.done,c.value)})}}function s(o,c,h,f){Promise.resolve(f).then(function(d){o({value:d,done:h})},c)}}function D(n){return typeof n=="function"}function dn(n){var e=function(r){Error.call(r),r.stack=new Error().stack},t=n(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Zt=dn(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
10
+ `+t.map(function(r,s){return s+1+") "+r.toString()}).join(`
11
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function nt(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var he=function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,r,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var h=Ee(c),f=h.next();!f.done;f=h.next()){var d=f.value;d.remove(this)}}catch(I){e={error:I}}finally{try{f&&!f.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}else c.remove(this);var $=this.initialTeardown;if(D($))try{$()}catch(I){o=I instanceof Zt?I.errors:[I]}var w=this._finalizers;if(w){this._finalizers=null;try{for(var S=Ee(w),C=S.next();!C.done;C=S.next()){var R=C.value;try{Xn(R)}catch(I){o=o??[],I instanceof Zt?o=Me(Me([],je(o)),je(I.errors)):o.push(I)}}}catch(I){r={error:I}}finally{try{C&&!C.done&&(s=S.return)&&s.call(S)}finally{if(r)throw r.error}}}if(o)throw new Zt(o)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Xn(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&nt(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&nt(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=function(){var e=new n;return e.closed=!0,e}(),n}(),Ar=he.EMPTY;function Sr(n){return n instanceof he||n&&"closed"in n&&D(n.remove)&&D(n.add)&&D(n.unsubscribe)}function Xn(n){D(n)?n():n.unsubscribe()}var xr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},an={setTimeout:function(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var s=an.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,Me([n,e],je(t))):setTimeout.apply(void 0,Me([n,e],je(t)))},clearTimeout:function(n){var e=an.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(n)},delegate:void 0};function Er(n){an.setTimeout(function(){throw n})}function Zn(){}function kt(n){n()}var pn=function(n){oe(e,n);function e(t){var r=n.call(this)||this;return r.isStopped=!1,t?(r.destination=t,Sr(t)&&t.add(r)):r.destination=ts,r}return e.create=function(t,r,s){return new cn(t,r,s)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(he),Xi=Function.prototype.bind;function en(n,e){return Xi.call(n,e)}var Zi=function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(r){wt(r)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(r){wt(r)}else wt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){wt(t)}},n}(),cn=function(n){oe(e,n);function e(t,r,s){var o=n.call(this)||this,c;if(D(t)||!t)c={next:t??void 0,error:r??void 0,complete:s??void 0};else{var h;o&&xr.useDeprecatedNextContext?(h=Object.create(t),h.unsubscribe=function(){return o.unsubscribe()},c={next:t.next&&en(t.next,h),error:t.error&&en(t.error,h),complete:t.complete&&en(t.complete,h)}):c=t}return o.destination=new Zi(c),o}return e}(pn);function wt(n){Er(n)}function es(n){throw n}var ts={closed:!0,next:Zn,error:es,complete:Zn},mn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Or(n){return n}function ns(n){return n.length===0?Or:n.length===1?n[0]:function(t){return n.reduce(function(r,s){return s(r)},t)}}var Z=function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,r){var s=this,o=is(e)?e:new cn(e,t,r);return kt(function(){var c=s,h=c.operator,f=c.source;o.add(h?h.call(o,f):f?s._subscribe(o):s._trySubscribe(o))}),o},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var r=this;return t=er(t),new t(function(s,o){var c=new cn({next:function(h){try{e(h)}catch(f){o(f),c.unsubscribe()}},error:o,complete:s});r.subscribe(c)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[mn]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ns(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=er(e),new e(function(r,s){var o;t.subscribe(function(c){return o=c},function(c){return s(c)},function(){return r(o)})})},n.create=function(e){return new n(e)},n}();function er(n){var e;return(e=n??xr.Promise)!==null&&e!==void 0?e:Promise}function rs(n){return n&&D(n.next)&&D(n.error)&&D(n.complete)}function is(n){return n&&n instanceof pn||rs(n)&&Sr(n)}function ss(n){return D(n==null?void 0:n.lift)}function de(n){return function(e){if(ss(e))return e.lift(function(t){try{return n(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function fe(n,e,t,r,s){return new os(n,e,t,r,s)}var os=function(n){oe(e,n);function e(t,r,s,o,c,h){var f=n.call(this,t)||this;return f.onFinalize=c,f.shouldUnsubscribe=h,f._next=r?function(d){try{r(d)}catch($){t.error($)}}:n.prototype._next,f._error=o?function(d){try{o(d)}catch($){t.error($)}finally{this.unsubscribe()}}:n.prototype._error,f._complete=s?function(){try{s()}catch(d){t.error(d)}finally{this.unsubscribe()}}:n.prototype._complete,f}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;n.prototype.unsubscribe.call(this),!r&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(pn),as=dn(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),xt=function(n){oe(e,n);function e(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var r=new tr(this,this);return r.operator=t,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new as},e.prototype.next=function(t){var r=this;kt(function(){var s,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var c=Ee(r.currentObservers),h=c.next();!h.done;h=c.next()){var f=h.value;f.next(t)}}catch(d){s={error:d}}finally{try{h&&!h.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}}})},e.prototype.error=function(t){var r=this;kt(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var s=r.observers;s.length;)s.shift().error(t)}})},e.prototype.complete=function(){var t=this;kt(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var r=t.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var r=this,s=this,o=s.hasError,c=s.isStopped,h=s.observers;return o||c?Ar:(this.currentObservers=null,h.push(t),new he(function(){r.currentObservers=null,nt(h,t)}))},e.prototype._checkFinalizedStatuses=function(t){var r=this,s=r.hasError,o=r.thrownError,c=r.isStopped;s?t.error(o):c&&t.complete()},e.prototype.asObservable=function(){var t=new Z;return t.source=this,t},e.create=function(t,r){return new tr(t,r)},e}(Z),tr=function(n){oe(e,n);function e(t,r){var s=n.call(this)||this;return s.destination=t,s.source=r,s}return e.prototype.next=function(t){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.next)===null||s===void 0||s.call(r,t)},e.prototype.error=function(t){var r,s;(s=(r=this.destination)===null||r===void 0?void 0:r.error)===null||s===void 0||s.call(r,t)},e.prototype.complete=function(){var t,r;(r=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||r===void 0||r.call(t)},e.prototype._subscribe=function(t){var r,s;return(s=(r=this.source)===null||r===void 0?void 0:r.subscribe(t))!==null&&s!==void 0?s:Ar},e}(xt),nr=function(n){oe(e,n);function e(t){var r=n.call(this)||this;return r._value=t,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var r=n.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},e.prototype.getValue=function(){var t=this,r=t.hasError,s=t.thrownError,o=t._value;if(r)throw s;return this._throwIfClosed(),o},e.prototype.next=function(t){n.prototype.next.call(this,this._value=t)},e}(xt),vn={now:function(){return(vn.delegate||Date).now()},delegate:void 0},tt=function(n){oe(e,n);function e(t,r,s){t===void 0&&(t=1/0),r===void 0&&(r=1/0),s===void 0&&(s=vn);var o=n.call(this)||this;return o._bufferSize=t,o._windowTime=r,o._timestampProvider=s,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(t){var r=this,s=r.isStopped,o=r._buffer,c=r._infiniteTimeWindow,h=r._timestampProvider,f=r._windowTime;s||(o.push(t),!c&&o.push(h.now()+f)),this._trimBuffer(),n.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(t),s=this,o=s._infiniteTimeWindow,c=s._buffer,h=c.slice(),f=0;f<h.length&&!t.closed;f+=o?1:2)t.next(h[f]);return this._checkFinalizedStatuses(t),r},e.prototype._trimBuffer=function(){var t=this,r=t._bufferSize,s=t._timestampProvider,o=t._buffer,c=t._infiniteTimeWindow,h=(c?1:2)*r;if(r<1/0&&h<o.length&&o.splice(0,o.length-h),!c){for(var f=s.now(),d=0,$=1;$<o.length&&o[$]<=f;$+=2)d=$;d&&o.splice(0,d+1)}},e}(xt),cs=function(n){oe(e,n);function e(t,r){return n.call(this)||this}return e.prototype.schedule=function(t,r){return this},e}(he),At={setInterval:function(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];var s=At.delegate;return s!=null&&s.setInterval?s.setInterval.apply(s,Me([n,e],je(t))):setInterval.apply(void 0,Me([n,e],je(t)))},clearInterval:function(n){var e=At.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(n)},delegate:void 0},ls=function(n){oe(e,n);function e(t,r){var s=n.call(this,t,r)||this;return s.scheduler=t,s.work=r,s.pending=!1,s}return e.prototype.schedule=function(t,r){var s;if(r===void 0&&(r=0),this.closed)return this;this.state=t;var o=this.id,c=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(c,o,r)),this.pending=!0,this.delay=r,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(c,this.id,r),this},e.prototype.requestAsyncId=function(t,r,s){return s===void 0&&(s=0),At.setInterval(t.flush.bind(t,this),s)},e.prototype.recycleAsyncId=function(t,r,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return r;r!=null&&At.clearInterval(r)},e.prototype.execute=function(t,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(t,r);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,r){var s=!1,o;try{this.work(t)}catch(c){s=!0,o=c||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,r=t.id,s=t.scheduler,o=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nt(o,this),r!=null&&(this.id=this.recycleAsyncId(s,r,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},e}(cs),rr=function(){function n(e,t){t===void 0&&(t=n.now),this.schedulerActionCtor=e,this.now=t}return n.prototype.schedule=function(e,t,r){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},n.now=vn.now,n}(),us=function(n){oe(e,n);function e(t,r){r===void 0&&(r=rr.now);var s=n.call(this,t,r)||this;return s.actions=[],s._active=!1,s}return e.prototype.flush=function(t){var r=this.actions;if(this._active){r.push(t);return}var s;this._active=!0;do if(s=t.execute(t.state,t.delay))break;while(t=r.shift());if(this._active=!1,s){for(;t=r.shift();)t.unsubscribe();throw s}},e}(rr),Ir=new us(ls),fs=Ir,hs=new Z(function(n){return n.complete()});function Cr(n){return n&&D(n.schedule)}function ds(n){return n[n.length-1]}function Tr(n){return Cr(ds(n))?n.pop():void 0}var Lr=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function Pr(n){return D(n==null?void 0:n.then)}function Rr(n){return D(n[mn])}function jr(n){return Symbol.asyncIterator&&D(n==null?void 0:n[Symbol.asyncIterator])}function Mr(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ps(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Nr=ps();function Fr(n){return D(n==null?void 0:n[Nr])}function Hr(n){return Ji(this,arguments,function(){var t,r,s,o;return kr(this,function(c){switch(c.label){case 0:t=n.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,Pe(t.read())];case 3:return r=c.sent(),s=r.value,o=r.done,o?[4,Pe(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,Pe(s)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Ur(n){return D(n==null?void 0:n.getReader)}function ct(n){if(n instanceof Z)return n;if(n!=null){if(Rr(n))return ms(n);if(Lr(n))return vs(n);if(Pr(n))return bs(n);if(jr(n))return Br(n);if(Fr(n))return ys(n);if(Ur(n))return _s(n)}throw Mr(n)}function ms(n){return new Z(function(e){var t=n[mn]();if(D(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function vs(n){return new Z(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function bs(n){return new Z(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Er)})}function ys(n){return new Z(function(e){var t,r;try{for(var s=Ee(n),o=s.next();!o.done;o=s.next()){var c=o.value;if(e.next(c),e.closed)return}}catch(h){t={error:h}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}e.complete()})}function Br(n){return new Z(function(e){ws(n,e).catch(function(t){return e.error(t)})})}function _s(n){return Br(Hr(n))}function ws(n,e){var t,r,s,o;return Ki(this,void 0,void 0,function(){var c,h;return kr(this,function(f){switch(f.label){case 0:f.trys.push([0,5,6,11]),t=Qi(n),f.label=1;case 1:return[4,t.next()];case 2:if(r=f.sent(),!!r.done)return[3,4];if(c=r.value,e.next(c),e.closed)return[2];f.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return h=f.sent(),s={error:h},[3,11];case 6:return f.trys.push([6,,9,10]),r&&!r.done&&(o=t.return)?[4,o.call(t)]:[3,8];case 7:f.sent(),f.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function se(n,e,t,r,s){r===void 0&&(r=0),s===void 0&&(s=!1);var o=e.schedule(function(){t(),s?n.add(this.schedule(null,r)):this.unsubscribe()},r);if(n.add(o),!s)return o}function Wr(n,e){return e===void 0&&(e=0),de(function(t,r){t.subscribe(fe(r,function(s){return se(r,n,function(){return r.next(s)},e)},function(){return se(r,n,function(){return r.complete()},e)},function(s){return se(r,n,function(){return r.error(s)},e)}))})}function Dr(n,e){return e===void 0&&(e=0),de(function(t,r){r.add(n.schedule(function(){return t.subscribe(r)},e))})}function gs(n,e){return ct(n).pipe(Dr(e),Wr(e))}function $s(n,e){return ct(n).pipe(Dr(e),Wr(e))}function ks(n,e){return new Z(function(t){var r=0;return e.schedule(function(){r===n.length?t.complete():(t.next(n[r++]),t.closed||this.schedule())})})}function As(n,e){return new Z(function(t){var r;return se(t,e,function(){r=n[Nr](),se(t,e,function(){var s,o,c;try{s=r.next(),o=s.value,c=s.done}catch(h){t.error(h);return}c?t.complete():t.next(o)},0,!0)}),function(){return D(r==null?void 0:r.return)&&r.return()}})}function qr(n,e){if(!n)throw new Error("Iterable cannot be null");return new Z(function(t){se(t,e,function(){var r=n[Symbol.asyncIterator]();se(t,e,function(){r.next().then(function(s){s.done?t.complete():t.next(s.value)})},0,!0)})})}function Ss(n,e){return qr(Hr(n),e)}function xs(n,e){if(n!=null){if(Rr(n))return gs(n,e);if(Lr(n))return ks(n,e);if(Pr(n))return $s(n,e);if(jr(n))return qr(n,e);if(Fr(n))return As(n,e);if(Ur(n))return Ss(n,e)}throw Mr(n)}function Et(n,e){return e?xs(n,e):ct(n)}function Es(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Tr(n);return Et(n,t)}var Os=dn(function(n){return function(){n(this),this.name="EmptyError",this.message="no elements in sequence"}});function gt(n,e){var t=typeof e=="object";return new Promise(function(r,s){var o=!1,c;n.subscribe({next:function(h){c=h,o=!0},error:s,complete:function(){o?r(c):t?r(e.defaultValue):s(new Os)}})})}function Is(n){return n instanceof Date&&!isNaN(n)}function Le(n,e){return de(function(t,r){var s=0;t.subscribe(fe(r,function(o){r.next(n.call(e,o,s++))}))})}function Cs(n,e,t,r,s,o,c,h){var f=[],d=0,$=0,w=!1,S=function(){w&&!f.length&&!d&&e.complete()},C=function(I){return d<r?R(I):f.push(I)},R=function(I){o&&e.next(I),d++;var q=!1;ct(t(I,$++)).subscribe(fe(e,function(N){s==null||s(N),o?C(N):e.next(N)},function(){q=!0},void 0,function(){if(q)try{d--;for(var N=function(){var j=f.shift();c?se(e,c,function(){return R(j)}):R(j)};f.length&&d<r;)N();S()}catch(j){e.error(j)}}))};return n.subscribe(fe(e,C,function(){w=!0,S()})),function(){h==null||h()}}function Ne(n,e,t){return t===void 0&&(t=1/0),D(e)?Ne(function(r,s){return Le(function(o,c){return e(r,o,s,c)})(ct(n(r,s)))},t):(typeof e=="number"&&(t=e),de(function(r,s){return Cs(r,s,n,t)}))}function ir(n,e,t){n===void 0&&(n=0),t===void 0&&(t=fs);var r=-1;return e!=null&&(Cr(e)?t=e:r=e),new Z(function(s){var o=Is(n)?+n-t.now():n;o<0&&(o=0);var c=0;return t.schedule(function(){s.closed||(s.next(c++),0<=r?this.schedule(void 0,r):s.complete())},o)})}function xe(n,e){return de(function(t,r){var s=0;t.subscribe(fe(r,function(o){return n.call(e,o,s++)&&r.next(o)}))})}function Ts(n){for(var e,t,r=[],s=1;s<arguments.length;s++)r[s-1]=arguments[s];var o=(e=Tr(r))!==null&&e!==void 0?e:Ir,c=(t=r[0])!==null&&t!==void 0?t:null,h=r[1]||1/0;return de(function(f,d){var $=[],w=!1,S=function(I){var q=I.buffer,N=I.subs;N.unsubscribe(),nt($,I),d.next(q),w&&C()},C=function(){if($){var I=new he;d.add(I);var q=[],N={buffer:q,subs:I};$.push(N),se(I,o,function(){return S(N)},n)}};c!==null&&c>=0?se(d,o,C,c,!0):w=!0,C();var R=fe(d,function(I){var q,N,j=$.slice();try{for(var F=Ee(j),V=F.next();!V.done;V=F.next()){var ut=V.value,re=ut.buffer;re.push(I),h<=re.length&&S(ut)}}catch(J){q={error:J}}finally{try{V&&!V.done&&(N=F.return)&&N.call(F)}finally{if(q)throw q.error}}},function(){for(;$!=null&&$.length;)d.next($.shift().buffer);R==null||R.unsubscribe(),d.complete(),d.unsubscribe()},void 0,function(){return $=null});f.subscribe(R)})}function Ls(n,e){return D(e)?Ne(n,e,1):Ne(n,1)}function ln(n){return n<=0?function(){return hs}:de(function(e,t){var r=0;e.subscribe(fe(t,function(s){++r<=n&&(t.next(s),n<=r&&t.complete())}))})}function Ps(){return de(function(n,e){var t,r=!1;n.subscribe(fe(e,function(s){var o=t;t=s,r&&e.next([o,s]),r=!0}))})}function Rs(n,e,t){var r=D(n)||e||t?{next:n,error:e,complete:t}:n;return r?de(function(s,o){var c;(c=r.subscribe)===null||c===void 0||c.call(r);var h=!0;s.subscribe(fe(o,function(f){var d;(d=r.next)===null||d===void 0||d.call(r,f),o.next(f)},function(){var f;h=!1,(f=r.complete)===null||f===void 0||f.call(r),o.complete()},function(f){var d;h=!1,(d=r.error)===null||d===void 0||d.call(r,f),o.error(f)},function(){var f,d;h&&((f=r.unsubscribe)===null||f===void 0||f.call(r)),(d=r.finalize)===null||d===void 0||d.call(r)}))}):Or}const js="en",Ms=(n,e=js)=>typeof n=="string"?n:n==null?void 0:n[e];function Ns(n){return Object.entries(n).reduce((e,[t,r])=>(e[t]=Ms(r),e),{})}const rt=(...n)=>{},Vr=n=>Array.isArray(n)?n:[n],Gr=({document:{baseURI:n},location:{href:e}})=>t=>new URL(t,new URL(n,e)),Yr=(n,e)=>{let t=e;return e instanceof URL||(t=n(typeof e=="string"?e:e.url)),t},Fs=(n,e)=>{const{href:t,origin:r}=e;return n===r?t.substring(n.length):t},Hs=(n,e,t=0)=>{const{selectors:r}=e;return n.querySelector(r[t])};function Us(n){return document.querySelector(n)}const Bs=(n,e)=>{const t=e.get(n);if(t){const{css:r,rest:s,subscription:o}=t;s.forEach(c=>{var h;return(h=c.__unfocus_handler)==null?void 0:h.call(c)}),o.unsubscribe(),t.elementToFocus.forEach((c,h)=>{Object.assign(c.style,r[h])})}e.delete(n)},Ws=n=>n!==void 0;function Ds(n,e,t){const r=new Map,s=Us.bind(n),o=e.pipe(Ps(),Rs(([c])=>{var h;if(c!==void 0){const f=Hs(n,c);f!==null&&((h=f.__unfocus_handler)==null||h.call(f),Bs(f,r))}}),Le(([,c])=>c),xe(Ws),Le(c=>{const[h,...f]=c.selectors,d=f.reduce(($,w)=>{var S;const C=s(w);if(C){$.push(C);const R=(S=C.__focus_handler)==null?void 0:S.call(C);R&&"then"in R&&R.catch(rt)}return $},[]);return{first:h,next:c,otherElements:d}}),Le(c=>({...c,firstElement:s(c.first)})),xe(c=>c.firstElement!==null),Le(c=>{var h,f;return{...c,focus:(f=(h=c.firstElement).__focus_handler)==null?void 0:f.call(h)}}),Ls(({focus:c,...h})=>(c&&"then"in c?c:Promise.resolve(c??h.firstElement)).then(d=>({focus:d,...h})).catch(()=>({focus:void 0,...h})))).subscribe(({otherElements:c,next:h,firstElement:f,focus:d})=>{const $=Object.keys(h.style),w=new he,S=Vr(d??f).filter(Boolean),C={css:[],elementToFocus:S,rest:c,subscription:w},R=$.reduce((I,q)=>(S.forEach((N,j)=>{var F;I.css[j]=Object.assign((F=I.css[j])!=null?F:{},{[q]:N.style[q]})}),I),C);w.add(t.pipe(xe(I=>I==="select"),ln(1)).subscribe(()=>{S.forEach(I=>{Object.assign(I.style,h.style)})})),r.set(f,R)});return()=>o.unsubscribe()}var qs=Object.defineProperty,Vs=(n,e,t)=>e in n?qs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,be=(n,e,t)=>(Vs(n,typeof e!="symbol"?e+"":e,t),t);let Gs=class{constructor(e){be(this,"_input"),be(this,"_length"),be(this,"_idx",0),be(this,"_mode",0),be(this,"_literals",[]),be(this,"_variables",[]),be(this,"_braketCount",0),be(this,"_done",!1),this._input=e,this._length=e.length}concatToLastLiteral(e){this._literals.push(this._literals.pop().concat(e))}concatToLastVariable(e){this._variables.push(this._variables.pop().concat(e))}get(){const e=[...this._literals],t=Object.assign([],e);return Object.defineProperty(t,"raw",{value:e,writable:!1}),{literals:t,variables:this._variables}}run(){for(this._length===0&&this._literals.push("");this._idx<this._length;){const e=this._input.charAt(this._idx);switch(this._mode){case 0:{this._literals.length===0&&this._literals.push(""),e==="{"&&this._idx+1!==this._length&&this._input.charAt(this._idx+1)==="{"?(this._literals.push(""),this._variables.push(""),this._mode=1,this._idx+=1):this.concatToLastLiteral(e);break}case 1:e==="}"&&this._input.charAt(this._idx+1)==="}"?(this._mode=0,this._idx+=1):this.concatToLastVariable(e);break}this._idx+=1}this._mode===1&&(this._literals.pop(),this.concatToLastLiteral(`{{${this._variables.pop()}`)),this._done=!0}};const Ys=n=>{const e=n.trim();if(!(e.startsWith("[")&&e.endsWith("]")))return!1;const t=e.slice(1).slice(0,-1).trim();return Number.parseInt(t).toString(10)===t},zs=n=>Number.parseInt(n.trim().slice(1).slice(0,-1).trim());function Ks(n,e,t){if(!e.trim())return t?`{{${e}}}`:"";const r=e.trim().split(".").reduce((s,o)=>{if(Array.isArray(s)&&Ys(o))return s[zs(o)];if(typeof s=="object"&&s!==null&&o in s)return s[o]},{...n});return typeof r=="string"?r:t?`{{${e}}}`:""}function Js(n,e,t=!1){const r=new Gs(n);r.run();const s=r.get();let[o]=s.literals;for(let c=0;c<s.variables.length;c++)o=o.concat(Ks(e,s.variables[c],t)).concat(s.literals[c+1]);return o}const Qs=(n,e)=>Object.fromEntries(Object.entries(n).map(([t,r])=>[t,Js(r,e)]));var Xs=Object.defineProperty,Zs=(n,e,t)=>e in n?Xs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$t=(n,e,t)=>(Zs(n,typeof e!="symbol"?e+"":e,t),t);const un="__mia_preview_id",eo=1e6,zr={"click-element":0,"ctrl-space":0,"focus-element":0,mousedown:0,mousemove:1,"new-configuration":0,notification:0,options:0,"request-resource":0,"tag-info":0,update:0,updated:0},to=n=>Object.keys(zr).includes(n);function no(n,e){if(n===null||typeof n!="object"||!("type"in n)||typeof n.type!="string")return!1;const{type:t}=n;if(!t.startsWith(e))return!1;const r=t.substring(e.length);return!!to(r)}const ro=(n,e)=>({...e,type:`${n}${e.type}`}),io=(n,e)=>{let{type:t}=e;return t.startsWith(n)&&(t=t.substring(n.length)),{...e,type:t}},so=()=>{let n="#";for(let e=0;e<3;e++)n+=`0${Math.floor(Math.random()*Math.pow(16,2)/2).toString(16)}`.slice(-2);return n};class oo{constructor(e){$t(this,"__instance"),$t(this,"__handler"),$t(this,"__window"),$t(this,"__randomColor"),this.__instance="",this.__handler=e,this.__window=window,this.__randomColor=so()}postMessage(e,t,r){if(this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&console.assert(e!==this.__window),this.__window.__BACKOFFICE_CONFIGURATOR_LOG_LEVEL__==="debug"&&zr[t.type]!==1){const s=this.__randomColor,c={background:`${s}22`,color:s},h=this.__window.top!==this.__window;console.groupCollapsed(`%c Msg from ${this.__window.origin} ${h?"(inner)":"(top)"} `,Object.entries(c).map(([f,d])=>`${f}: ${d}`).join("; ")),console.info(`window '${this.__window.origin}' is sending a message of type %c ${t.type} `,"background: lightgreen; color: darkgreen"),console.log(t.content),console.groupEnd()}e.postMessage(ro(this.__instance,t),r)}set instance(e){this.__instance=e}get window(){return this.__window}set window(e){this.__window=e}send(e,t,r="*"){this.__window!==e&&this.postMessage(e,t,r)}recv(e,t=null){const r=({data:s,source:o})=>{if((t===null||o===t)&&no(s,this.__instance)){const c=io(this.__instance,s);this.__handler(c)}};return e.addEventListener("message",r),()=>e.removeEventListener("message",r)}}var tn;const St=window,Fe=St.trustedTypes,sr=Fe?Fe.createPolicy("lit-html",{createHTML:n=>n}):void 0,fn="$lit$",ye=`lit$${(Math.random()+"").slice(9)}$`,Kr="?"+ye,ao=`<${Kr}>`,He=document,it=()=>He.createComment(""),st=n=>n===null||typeof n!="object"&&typeof n!="function",Jr=Array.isArray,co=n=>Jr(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",nn=`[
12
+ \f\r]`,et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,or=/-->/g,ar=/>/g,Se=RegExp(`>|${nn}(?:([^\\s"'>=/]+)(${nn}*=${nn}*(?:[^
13
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),cr=/'/g,lr=/"/g,Qr=/^(?:script|style|textarea|title)$/i,lo=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),uo=lo(1),ot=Symbol.for("lit-noChange"),z=Symbol.for("lit-nothing"),ur=new WeakMap,Re=He.createTreeWalker(He,129,null,!1),fo=(n,e)=>{const t=n.length-1,r=[];let s,o=e===2?"<svg>":"",c=et;for(let f=0;f<t;f++){const d=n[f];let $,w,S=-1,C=0;for(;C<d.length&&(c.lastIndex=C,w=c.exec(d),w!==null);)C=c.lastIndex,c===et?w[1]==="!--"?c=or:w[1]!==void 0?c=ar:w[2]!==void 0?(Qr.test(w[2])&&(s=RegExp("</"+w[2],"g")),c=Se):w[3]!==void 0&&(c=Se):c===Se?w[0]===">"?(c=s??et,S=-1):w[1]===void 0?S=-2:(S=c.lastIndex-w[2].length,$=w[1],c=w[3]===void 0?Se:w[3]==='"'?lr:cr):c===lr||c===cr?c=Se:c===or||c===ar?c=et:(c=Se,s=void 0);const R=c===Se&&n[f+1].startsWith("/>")?" ":"";o+=c===et?d+ao:S>=0?(r.push($),d.slice(0,S)+fn+d.slice(S)+ye+R):d+ye+(S===-2?(r.push(void 0),f):R)}const h=o+(n[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[sr!==void 0?sr.createHTML(h):h,r]};class at{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let o=0,c=0;const h=e.length-1,f=this.parts,[d,$]=fo(e,t);if(this.el=at.createElement(d,r),Re.currentNode=this.el.content,t===2){const w=this.el.content,S=w.firstChild;S.remove(),w.append(...S.childNodes)}for(;(s=Re.nextNode())!==null&&f.length<h;){if(s.nodeType===1){if(s.hasAttributes()){const w=[];for(const S of s.getAttributeNames())if(S.endsWith(fn)||S.startsWith(ye)){const C=$[c++];if(w.push(S),C!==void 0){const R=s.getAttribute(C.toLowerCase()+fn).split(ye),I=/([.?@])?(.*)/.exec(C);f.push({type:1,index:o,name:I[2],strings:R,ctor:I[1]==="."?po:I[1]==="?"?vo:I[1]==="@"?bo:Ot})}else f.push({type:6,index:o})}for(const S of w)s.removeAttribute(S)}if(Qr.test(s.tagName)){const w=s.textContent.split(ye),S=w.length-1;if(S>0){s.textContent=Fe?Fe.emptyScript:"";for(let C=0;C<S;C++)s.append(w[C],it()),Re.nextNode(),f.push({type:2,index:++o});s.append(w[S],it())}}}else if(s.nodeType===8)if(s.data===Kr)f.push({type:2,index:o});else{let w=-1;for(;(w=s.data.indexOf(ye,w+1))!==-1;)f.push({type:7,index:o}),w+=ye.length-1}o++}}static createElement(e,t){const r=He.createElement("template");return r.innerHTML=e,r}}function Ue(n,e,t=n,r){var s,o,c,h;if(e===ot)return e;let f=r!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[r]:t._$Cl;const d=st(e)?void 0:e._$litDirective$;return(f==null?void 0:f.constructor)!==d&&((o=f==null?void 0:f._$AO)===null||o===void 0||o.call(f,!1),d===void 0?f=void 0:(f=new d(n),f._$AT(n,t,r)),r!==void 0?((c=(h=t)._$Co)!==null&&c!==void 0?c:h._$Co=[])[r]=f:t._$Cl=f),f!==void 0&&(e=Ue(n,f._$AS(n,e.values),f,r)),e}class ho{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:r},parts:s}=this._$AD,o=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:He).importNode(r,!0);Re.currentNode=o;let c=Re.nextNode(),h=0,f=0,d=s[0];for(;d!==void 0;){if(h===d.index){let $;d.type===2?$=new lt(c,c.nextSibling,this,e):d.type===1?$=new d.ctor(c,d.name,d.strings,this,e):d.type===6&&($=new yo(c,this,e)),this.u.push($),d=s[++f]}h!==(d==null?void 0:d.index)&&(c=Re.nextNode(),h++)}return o}p(e){let t=0;for(const r of this.u)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class lt{constructor(e,t,r,s){var o;this.type=2,this._$AH=z,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=s,this._$Cm=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Ue(this,e,t),st(e)?e===z||e==null||e===""?(this._$AH!==z&&this._$AR(),this._$AH=z):e!==this._$AH&&e!==ot&&this.g(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):co(e)?this.k(e):this.g(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}g(e){this._$AH!==z&&st(this._$AH)?this._$AA.nextSibling.data=e:this.T(He.createTextNode(e)),this._$AH=e}$(e){var t;const{values:r,_$litType$:s}=e,o=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=at.createElement(s.h,this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===o)this._$AH.p(r);else{const c=new ho(o,this),h=c.v(this.options);c.p(r),this.T(h),this._$AH=c}}_$AC(e){let t=ur.get(e.strings);return t===void 0&&ur.set(e.strings,t=new at(e)),t}k(e){Jr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,s=0;for(const o of e)s===t.length?t.push(r=new lt(this.S(it()),this.S(it()),this,this.options)):r=t[s],r._$AI(o),s++;s<t.length&&(this._$AR(r&&r._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var r;for((r=this._$AP)===null||r===void 0||r.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cm=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class Ot{constructor(e,t,r,s,o){this.type=1,this._$AH=z,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,r,s){const o=this.strings;let c=!1;if(o===void 0)e=Ue(this,e,t,0),c=!st(e)||e!==this._$AH&&e!==ot,c&&(this._$AH=e);else{const h=e;let f,d;for(e=o[0],f=0;f<o.length-1;f++)d=Ue(this,h[r+f],t,f),d===ot&&(d=this._$AH[f]),c||(c=!st(d)||d!==this._$AH[f]),d===z?e=z:e!==z&&(e+=(d??"")+o[f+1]),this._$AH[f]=d}c&&!s&&this.j(e)}j(e){e===z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class po extends Ot{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===z?void 0:e}}const mo=Fe?Fe.emptyScript:"";class vo extends Ot{constructor(){super(...arguments),this.type=4}j(e){e&&e!==z?this.element.setAttribute(this.name,mo):this.element.removeAttribute(this.name)}}class bo extends Ot{constructor(e,t,r,s,o){super(e,t,r,s,o),this.type=5}_$AI(e,t=this){var r;if((e=(r=Ue(this,e,t,0))!==null&&r!==void 0?r:z)===ot)return;const s=this._$AH,o=e===z&&s!==z||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,c=e!==z&&(s===z||o);o&&this.element.removeEventListener(this.name,this,s),c&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,r;typeof this._$AH=="function"?this._$AH.call((r=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&r!==void 0?r:this.element,e):this._$AH.handleEvent(e)}}class yo{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ue(this,e)}}const fr=St.litHtmlPolyfillSupport;fr==null||fr(at,lt),((tn=St.litHtmlVersions)!==null&&tn!==void 0?tn:St.litHtmlVersions=[]).push("2.7.0");const _o=(n,e,t)=>{var r,s;const o=(r=t==null?void 0:t.renderBefore)!==null&&r!==void 0?r:e;let c=o._$litPart$;if(c===void 0){const h=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=c=new lt(e.insertBefore(it(),h),h,void 0,t??{})}return c._$AI(n),c};const wo=n=>{const e=n.charAt(0);return!(e!==n.charAt(n.length-1)||e!=="'"&&e!=='"')};function go(n){const e=n.match(/([^.]+)/g);return t=>e.reduce((r,s)=>{let o=s;if(s.startsWith("[")&&s.endsWith("]")){const c=s.slice(1,-1),h=Number.parseInt(c);!Number.isNaN(h)&&h.toString()===c?o=h:(c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'"))&&(o=c.slice(1,-1))}if(o==="")throw new TypeError("42",{cause:n});return typeof r=="object"&&r!==null?r[o]:void 0},t)}function $o(n,e={}){return n.reduce((t,r,s)=>{const o=r.trim(),c=Number.parseInt(o),h=Number.parseFloat(o);if(o==="")t[s]=o;else if(wo(o))t[s]=o.slice(1,-1);else if(["true","false"].includes(o))t[s]=o==="true";else if(!Number.isNaN(c)&&c.toString()===o)t[s]=c;else if(!Number.isNaN(h)&&h.toString()===o)t[s]=h;else if(o.startsWith("{")||o.startsWith("["))try{t[s]=JSON.parse(o)}catch(f){if(f instanceof SyntaxError)throw new TypeError("43",{cause:f.message})}else t[s]=go(o)(e);return t},[])}function Xr(n){return Array.isArray(n)?n:[n]}function ko(n){const e=typeof n=="string"?[n]:n;return Array.isArray(e)?e:Xr(e.uris)}const Ao=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function So(n){return Ao.includes(n.tag)}function xo(n){return Array.isArray(n)?n:[n]}function Zr(n,e,t){if(typeof e!="object"){n.push(`${e}`);return}xo(e).forEach(r=>{if(typeof r!="object"){n.push(`${r}`);return}const{tag:s,attributes:o={},booleanAttributes:c=[],properties:h={}}=r,f=So(r),d=`<${s}`,$=f?"/>":">",w=`</${s}>`,S=Object.entries(o).reduce((j,[F,V])=>(j.push(`${F}="${V}"`),j),[]),C=Xr(c),{override:R,props:I}=Object.entries(h).reduce((j,[F,V])=>(t.has(F)?typeof V=="string"&&(j.override[F]=V):j.props[F]=V,j),{override:{},props:{}}),q=Array.from(t.keys()).map(j=>{var F;return`.${j}=\${${(F=R[j])!=null?F:j}}`}),N=Object.entries(I).reduce((j,[F,V])=>{switch(typeof V){case"object":case"number":case"boolean":j.push(`.${F}=\${${JSON.stringify(V)}}`);break;case"string":j.push(`.${F}=\${"${V}"}`);break}return j},[]);if(n.push([d,S.join(" "),C.join(" "),q.join(" "),N.join(" "),$].join(" ")),!f){const{content:j}=r;j!==void 0&&Zr(n,j,t),n.push(w)}})}function Eo(n,e=new Set){const t=[];return Zr(t,n,e),t.join(" ")}const Oo="modulepreload",Io=function(n,e){return new URL(n,e).href},hr={},Co=function(e,t,r){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(o=>{if(o=Io(o,r),o in hr)return;hr[o]=!0;const c=o.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(!!r)for(let $=s.length-1;$>=0;$--){const w=s[$];if(w.href===o&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${h}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Oo,c||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),c)return new Promise(($,w)=>{d.addEventListener("load",$),d.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};function ei(n,...e){Co(()=>import("./errors-af3a2945.js"),[],import.meta.url).then(({default:t})=>{const r=t[n];r?console.error(r(...e)):console.error(...e)}).catch(t=>{console.error(`[micro-lc][composer]: Dynamic import error while importing logger utils - ${t.message}`)})}function To(n){return e=>{ei("0",n,e.message)}}const Lo=Object.freeze(Object.defineProperty({__proto__:null,dynamicImportError:To,error:ei},Symbol.toStringTag,{value:"Module"}));var dr=Lo;var Po=Object.defineProperty,Ro=(n,e,t)=>e in n?Po(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,le=(n,e,t)=>(Ro(n,typeof e!="symbol"?e+"":e,t),t);class jo{constructor(e){le(this,"_i",0),le(this,"_s"),le(this,"_l"),le(this,"_d",!1),le(this,"_m",0),le(this,"_st",[]),le(this,"_n",0),le(this,"_li",[]),le(this,"_v",[]),this._s=e,this._l=e.length,e.length===0&&(this._d=!0)}_sw(e){this._m=e}_fst(){this._st=[]}_fn(){this._v.push(this._st.join("")),this._fst()}_fs(){this._li.push(this._st.join("")),this._fst()}_fpn(){this._li.push(this._st.slice(0,-1).join("")),this._fst()}_nx(){const e=this._s.charAt(this._i);switch(this._m){case 1:{e==="{"?(this._n+=1,this._st.push(e)):e==="}"&&this._n===0?(this._fn(),this._sw(0)):e==="}"&&this._n>0?(this._st.push(e),this._n-=1):this._st.push(e);break}case 2:{e==="{"?(this._fpn(),this._sw(1)):(this._sw(0),this._st.push(e));break}case 0:default:{e==="$"&&this._sw(2),this._st.push(e);break}}if(this._i+=1,this._i===this._l){if(this._m===2)this._sw(0);else if(this._m===1)throw new TypeError("41",{cause:`${this._i}`});this._fs(),this._d=!0}}_c(){const e=[...this._li],t=Object.assign([],e);return Object.defineProperty(t,"raw",{value:e,writable:!1}),{literals:t,variables:this._v}}run(){for(;!this._d;)this._nx();return this._c()}}const Mo=async(n,e="SHA-1")=>window.crypto.subtle.digest(e,new TextEncoder().encode(n)),rn=new Map;async function No(n){const e=await Mo(n).catch(t=>{dr.error("40",n,t.message)});if(!e||!rn.has(e)){let t;try{t=new jo(n).run(),e&&rn.set(e,t)}catch(r){r instanceof TypeError&&dr.error(r.message,n,r.cause);const s=[];Object.defineProperty(s,"raw",{value:s,writable:!1}),t={literals:s,variables:[]}}return t}return rn.get(e)}class sn extends tt{}function Fo(){const n=[],e=new Proxy({},{get(t,r,s){return typeof r=="string"&&!Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=new sn),Reflect.get(t,r,s)}});return new Proxy(new sn,{get(t,r,s){if(r==="pool")return e;const o=typeof r=="string"?Number.parseInt(r,10):Number.NaN;return Number.isNaN(o)?Reflect.get(t,r,s):(n.at(o)===void 0&&(n[o]=new sn),n[o])}})}async function Ho(n,{extraProperties:e,context:t={}}={}){const r=Array.isArray(e)?new Set(e):e,s=Eo(n,r),o=await No(s),c=$o(o.variables,t),h=uo(o.literals,...c);return(f,d)=>_o(h,f,d)}async function Uo(n,e=window,t=console.error){var r;let s=[],o,c=Promise.resolve();if(n.sources){const{sources:h}=n;o=!Array.isArray(h)&&typeof h!="string"?(r=h.importmap)!=null?r:{}:{};try{e.importShim.addImportMap(o)}catch(f){t(f)}s=ko(h),s.length>0&&(c=Promise.all(s.map(f=>e.importShim(f).catch(t))))}return c.then(()=>({...n,sources:{importmap:o,uris:s}}))}async function Bo(n,e,t={}){return Ho(n.content,{context:t,extraProperties:new Set(Object.keys(t))}).then(s=>(s(e),null))}function Wo(){return{configuration:new tt,focus:new nr(void 0),infos:new tt,mocks:new tt,mode:new nr("select"),notification:new tt,updated:new xt,uppercaseTags:new Set}}const ti=n=>{let e=0;const t=n.getValue();return t==="interact"?e="select":t==="select"&&(e="interact"),n.next(e),e},te=Wo();function Do(n){switch(n.type){case"options":{const{content:{disableOverlay:e,redirectTo:t,timeout:r}}=n;e&&(Object.defineProperty(this.window,"__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__",{value:!0}),te.mode.next("interact")),r!==void 0&&Object.defineProperty(this.window,"__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__",{value:r});const{window:{history:s}}=this;t&&s.pushState(s.state,"",t);break}case"ctrl-space":ti(te.mode);break;case"new-configuration":te.configuration.next({...n.content,type:"reset"});break;case"update":te.configuration.next({...n.content,type:"update"});break;case"focus-element":te.focus.next(n.content);break}}const ue=new oo(Do),qo=n=>{var e;return{data:{message:n.message,name:n.name,stack:(e=n.stack)!=null?e:""},description:"preview.notifications.error.description",message:"preview.notifications.error.message",status:"error"}},ni=(n,e)=>ue.send(n.parent,{content:qo(e),type:"notification"}),ri=n=>"clientX"in n&&"clientY"in n;function pr(n,e){return t=>{ri(t)&&ue.send(n.parent,{content:{bubbles:!0,cancelable:!1,clientX:t.clientX,clientY:t.clientY},type:e})}}const Vo=(n,e)=>n.has(e.tagName)&&e.hasAttribute(un),Go=(n,e)=>{const{document:t}=n;return r=>{let s;if(ri(r)){const{clientX:o,clientY:c}=r;s=t.elementsFromPoint(o,c).reduce((h,f)=>{if(Vo(e.uppercaseTags,f)){const d=f.getAttribute(un);h.ids.push(d),h.selectors.push(`[${un}="${d}"]`)}return h},{ids:[],selectors:[]})}(e.mode.getValue()==="select"||s===void 0)&&ue.send(n.parent,{content:s&&(s.ids.length>0?s:void 0),type:"click-element"})}},Yo=n=>e=>{e.ctrlKey&&e.key===" "&&(e.preventDefault(),ti(n.mode),n.focus.next(void 0))},zo=([n,e])=>Et(e.then(t=>[n,t])),Ko=([n,e])=>{const t={label:n,properties:{},type:"layout"},{__manifest:r=Promise.resolve(t)}=e,s=r.then(o=>[e,{__manifest:{...t,...o},tag:n}]).catch(()=>[e,{__manifest:t,tag:n}]);return Et(s)},Jo=(n,e)=>Et(e.map(t=>[t,n.whenDefined(t)])).pipe(Ne(zo),Ne(Ko)),Qo=500;function bn(n){n instanceof Error&&ni(this,n)}function Xo(n,e){const t=bn.bind(this);return n.pipe(Ne(([,{__manifest:{label:r,description:s,...o},tag:c}])=>(delete o.mocks,Es({info:{...Ns({description:s,label:r}),...o},tag:c}))),Ts(Qo),xe(r=>r.length>0)).subscribe({error:t,next:r=>e(r)})}function Zo(n){const e=bn.bind(this);return n.pipe(Le(([,{__manifest:{mocks:t={}},tag:r}])=>[r,t])).subscribe({error:e,next:t=>{te.mocks.next(t)}})}async function ii(n,{addInfo:e,tags:t}){const{subscription:r}=this,s=bn.bind(this);if(n){const o=Jo(this.customElements,t);return Uo(n,this,s).then(()=>{r.add(Xo.call(this,o,e)),r.add(Zo.call(this,o))})}}const si=(n,e)=>{const{document:t}=n;let r=e.firstElementChild;return r===null&&(r=t.createElement("div"),r.style.height="inherit",r.style.display="flex",e.appendChild(r)),r};async function hn(n,e){const t=Fo(),{proxyWindow:r=this}=this;return Bo({content:n,sources:{importmap:{},uris:[]}},si(this,e),{eventBus:t,proxyWindow:r})}function oi(n){si(this,n).remove()}var ea=Object.defineProperty,ta=(n,e,t)=>e in n?ea(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,mr=(n,e,t)=>(ta(n,typeof e!="symbol"?e+"":e,t),t);function vr(n,e,t){const{properties:r,attributes:s,booleanAttributes:o=[]}=n,c=Object.assign(Object.fromEntries(Vr(o).map(f=>[f,!0])),{...s,...r});return e(c).map(({url:f,method:d="GET",notify:$=!1,handler:w=()=>Promise.resolve(new Response)})=>{var S;const C=Qs({...f,method:d},c),R=new URL(C.pathname,(S=C.origin)!=null?S:t);return[R.href,d,(I,q)=>w(I,q).finally(()=>{$&&this.notify(ai(d,R))})]})}const na=(n,e)=>{const{href:t,search:r}=n;return t.replace(/\?$/,"").substring(0,t.length-r.length).match(new RegExp(`^${e}$`))!==null},ra=(n,e)=>{const{href:t}=n;return t.match(new RegExp(`^${e.replace(/\/$/,"")}/`))!==null};class ia extends Map{constructor(e){super(),mr(this,"notify"),mr(this,"__urlMap",new Map),this.notify=e}add(e,t){var r,s;const{method:o,url:c}=e,h=(r=this.get(o))!=null?r:new Map,f=(s=this.__urlMap.get(o))!=null?s:[];h.set(c,t),f.push(c),this.set(o,h),this.__urlMap.set(o,f)}match(e){var t;const{method:r,url:s}=e,o=this.__urlMap.get(r);if(o===void 0)return;const c=o.reduce((h,f,d,$)=>{if(na(s,f)||ra(s,f)){if(h===void 0)return d;if($[h].length<f.length)return d}return h},void 0);if(c!==void 0)return(t=this.get(r))==null?void 0:t.get(o[c])}}const sa=n=>([e,t,r])=>n.add({method:t,url:e},r);async function br(n,e,t,r){const s=sa(n);return Array.isArray(e)?Promise.all(e.map(o=>vr.call(n,o,t,r)).flat().map(s)).then(rt):Promise.all(vr.call(n,e,t,r).map(s)).then(rt)}var yr;const _r=(yr=window.__BACKOFFICE_CONFIGURATOR_PREVIEW_TIMEOUT__)!=null?yr:5e3,oa=n=>n.includes("-"),wr=n=>({data:{tag:n},description:"preview.notifications.no-webcomponent-definition.description",message:"preview.notifications.no-webcomponent-definition.message",status:"warning"});async function aa(n,e=[]){const{location:{href:t},fetch:r}=this,s=Gr(this),o=new ia(this.notify.bind(this));await Promise.all(e.map(async h=>{var f;let d=()=>[];const $=await Promise.race([gt(ir(_r)),gt(te.mocks.pipe(xe(([S])=>S===h),ln(1)))]);if($===0)this.notify(wr(h));else{const[,{fetch:S}]=$;S!==void 0&&(d=S)}const w=(f=n.get(h))!=null?f:[];return br(o,w,d,t)})).catch(h=>h instanceof Error&&ni(this,h));const c=async(h,f)=>{var d;const $=Yr(s,h),w=o.match({method:(d=f==null?void 0:f.method)!=null?d:"GET",url:$});return w!==void 0?w($,f).then(S=>S):r(h,f)};if(this.proxyWindow){const h=Object.assign(c,{update:async f=>{let d=()=>[];if(oa(f.tag)){const $=await Promise.race([gt(ir(_r)),gt(te.mocks.pipe(xe(([w])=>w===f.tag),ln(1)))]);if($===0)this.notify(wr(f.tag));else{const[,{fetch:w}]=$;w!==void 0&&(d=w)}}return br(o,f,d,t)}});this.fetch=h,this.proxyWindow.fetch=h}}function ca(n,e){const{href:t,origin:r,pathname:s}=new URL(n??"",this.location.href);let o=t;return r===this.location.origin&&(o=`{ your domain }${s}`),this.notify({data:{nextUrl:o,target:e??"[undefined]"},description:"preview.notifications.navigation-event.description.open",message:"preview.notifications.navigation-event.message",status:"default"}),this}function la(n,e,t){const{href:r,origin:s,pathname:o}=new URL(t);let c=r;s===this.location.origin&&(c=`${o}`),this.notify({data:{nextUrl:c},description:"preview.notifications.navigation-event.description.pushState",message:"preview.notifications.navigation-event.message",status:"default"})}function ua(n,e,t){const{href:r,origin:s,pathname:o,search:c}=new URL(t);let h=r;s===this.location.origin&&(h=`${o}${c}`),this.notify({data:{nextUrl:h},description:"preview.notifications.navigation-event.description.replaceState",message:"preview.notifications.navigation-event.message",status:"info"})}function fa(n){return new Proxy(n,{get:(e,t)=>t==="pushState"?(r,s,o)=>{la.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:t==="replaceState"?(r,s,o)=>{ua.call(this,r,s,new URL(o??"",new URL(this.document.baseURI,this.location.href)))}:e[t]})}class gr extends Map{get length(){return this.size}clear(){super.clear()}getItem(e){var t;return(t=super.get(e))!=null?t:null}key(){return null}removeItem(e){super.delete(e)}setItem(e,t){super.set(e,t)}}const ha=n=>n.tagName==="A";function da(n){const{prototype:{createElement:e}}=Document;return Document.prototype.createElement=function(r,s){const o=e.call(this,r,s);if(ha(o)){const c=()=>{var h;return n.notify({data:{href:Fs(n.location.origin,new URL(o.href,n.location.href)),target:(h=o.getAttribute("target"))!=null?h:"_self"},description:"preview.notifications.anchor.description",message:"preview.notifications.anchor.message",status:"info"})};Object.defineProperty(o,"click",{get(){return c},set:rt})}return o},()=>{Document.prototype.createElement=e}}function pa(n,e){let t=n.fetch.bind(n);const r={notify:$=>e.next($)},s=new gr,o=new gr,c=Object.assign(n,r),h=new Proxy(c,{get($,w,S){if(w==="fetch")return t;if(w==="history")return fa.call($,$.history);if(w==="open")return ca.bind($);if(w==="localStorage")return s;if(w==="sessionStorage")return o;const C=Reflect.get($,w);return typeof C!="function"?C:function(...I){return Reflect.apply(C,this===S?n:this,I)}},set($,w,S){return w==="fetch"?(t=S,!0):Reflect.set($,w,S)}}),f=Object.assign(c,{proxyWindow:h}),d=da(f);return{sandbox:f,unpatch:d}}var ma=Object.defineProperty,va=(n,e,t)=>e in n?ma(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$r=(n,e,t)=>(va(n,typeof e!="symbol"?e+"":e,t),t);function ba(n,e){const{document:t}=n,r=t.createElement("div"),s="";r.style.display=s,r.style.position="fixed",r.style.width="100vw",r.style.height="100%",r.style.backgroundColor="rgba(0, 0, 0, 0.05)",r.style.zIndex=`${eo}`;const o=()=>r.style.display===s,c=()=>o()?r.style.display="none":r.style.display=s,h=e.pipe(xe(f=>n.__BACKOFFICE_CONFIGURATOR_DISABLE_OVERLAY__?f==="interact":!0)).subscribe(f=>{switch(f){case"interact":n.dispatchEvent(new Event("mousedown")),r.style.display="none";break;case"select":r.style.display=s;break;case 0:default:c();break}});return t.body.appendChild(r),{cleanup:()=>h.unsubscribe(),overlay:r}}const ya=n=>{const e=n.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.height="inherit",n.body.appendChild(e),e};function _a(n){const e=n;return Object.assign(n,{bootstrap:ii.bind(e),mocks:{fetch:new Map},subscription:new he,unmount:oi.bind(e),update:hn.bind(e)})}class wa{constructor(){$r(this,"_results",new Map),$r(this,"_queue",Promise.resolve())}add(e){const r=[...e].map(s=>{let o,c;const h=new Promise((f,d)=>{o=f,c=d});return this._queue=this._queue.then(()=>s()).then(f=>{o(f)}).catch(f=>c(f)),h});return Promise.allSettled(r)}get(e){return this._results.get(e)}}const ga=n=>e=>{e.forEach(t=>{t.status==="rejected"&&n.next({data:{reason:t.reason},description:"preview.notifications.lifecycle.description",message:"preview.notifications.lifecycle.message",status:"error"})})},$a=n=>e=>{n.infos.next(e),e.forEach(({tag:t})=>n.uppercaseTags.add(t.toUpperCase()))},ka=(n,e,t)=>{const r=new wa,s=t.configuration.subscribe(o=>{const{configuration:c}=o,{content:h}=c;let f;if(o.type==="reset"){const{contexts:d,tags:$}=o;f=r.add([()=>oi.call(n,e),()=>ii.call(n,c,{addInfo:$a(t),tags:$}),()=>aa.call(n,d,o.tags),()=>hn.call(n,h,e).finally(()=>t.updated.next(0))])}else{const{context:d}=o;f=r.add([()=>{var $,w,S;return(S=($=n.proxyWindow)==null?void 0:(w=$.fetch).update)==null?void 0:S.call(w,d)},()=>hn.call(n,h,e).finally(()=>t.updated.next(0))])}f.then(ga(t.notification)).catch(rt)});return()=>s.unsubscribe()},Aa=n=>{const{body:e}=n;e.style.height="100%",e.style.padding="0",e.style.margin="0"},Sa=(n,e)=>{const{location:{origin:t,port:r,protocol:s}}=n;return!(t!==e.origin||r!==e.port||s!==e.protocol)},ai=(n,e)=>({data:{method:n,url:e.href.substring(e.origin.length)},description:"preview.notifications.fetch-event.description",message:"preview.notifications.fetch-event.message",status:"info"}),xa=(n,e)=>{const t=Gr(n),{document:r,parent:s}=n;if(s===n)return;const o=n.fetch.bind(n);n.fetch=(c,h)=>{var f;const d=Yr(t,c);return Sa(r,d)&&e.next(ai((f=h==null?void 0:h.method)!=null?f:"GET",d)),o(c,h)}};function Ea(n,e){Aa(n.document),xa(n,e.notification);const{cleanup:t}=ba(n,e.mode.asObservable()),r=Ds(n.document,e.focus.asObservable(),e.mode.asObservable()),s=ya(n.document),o=_a(n),{sandbox:c,unpatch:h}=pa(o,e.notification),f=ka(c,s,e);return{cleanup:()=>{f(),h(),r(),t()},sandboxedWindow:c}}const Oa=n=>{ue.window=n};function Ia(n){const e=new he;return e.add(n.updated.subscribe(()=>{ue.send(window.parent,{content:{},type:"updated"})})),e.add(n.infos.subscribe(t=>{ue.send(window.parent,{content:t,type:"tag-info"})})),e.add(n.notification.subscribe(t=>{ue.send(window.parent,{content:t,type:"notification"})})),e.add(n.mode.subscribe(t=>{ue.send(window.parent,{content:{mode:t},type:"ctrl-space"})})),()=>e.unsubscribe()}function Ca(n,...e){const t=e.map(({type:r,handler:s})=>(n.addEventListener(r,s),()=>n.removeEventListener(r,s)));return()=>{t.forEach(r=>r())}}function Ta(n,e){n.addEventListener("unload",()=>{n.subscription.unsubscribe(),e.forEach(t=>t())})}(n=>{Oa(n);const e=ue.recv(n,n.top),t=Ia(te),r=Ca(n,{handler:Yo(te),type:"keydown"},{handler:pr(n,"mousemove"),type:"mousemove"},{handler:pr(n,"mousedown"),type:"mousedown"},{handler:Go(n,te),type:"mousedown"}),{cleanup:s,sandboxedWindow:o}=Ea(n,te);Ta(o,[s,r,t,e])})(window);