@telia-ace/widget-components-list-flamingo 1.1.120-rc.8 → 1.1.120
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.
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";const lt=(r,t,e,...s)=>{const i=`[${r.get("$environment").name||"webprovisions"}] ${e}`;switch(t){case"info":console.info(i,...s);break;case"warning":console.warn(i,...s);break;case"error":console.error(i,...s);break}},pe=r=>{const t=r.container||r;return{info:(e,...s)=>lt(t,"info",e,...s),warn:(e,...s)=>lt(t,"warning",e,...s),error:(e,...s)=>lt(t,"error",e,...s)}};var G=(r=>(r.Implementation="implementation",r.Widget="widget",r))(G||{}),S=(r=>(r.Pre="pre",r.Post="post",r))(S||{});const de=(r,t,e,s)=>{try{const i=new t(e,s);return{name:r,invoke:(n,o)=>{let a;return i[n]&&(a=i[n].call(i,o)),Promise.resolve(a)},getInstance:()=>i}}catch(i){if(i.message&&i.message.indexOf("is not a constructor")>=0)return{name:r,invoke:n=>{let o;return n==="initialize"&&(o=t(e,s)),Promise.resolve(o)},getInstance:()=>t};throw i}};function It(r,t){return typeof r>"u"?t:r}class ue{constructor(t={}){this.part=t}createCommand(t,e,s){let i;typeof e=="function"?i={scope:G.Widget,stage:S.Post,defaultArgs:void 0,handlerResolver:e}:i={scope:It(e.scope,G.Widget),stage:It(e.stage,S.Post),defaultArgs:e.defaultArgs,handlerResolver:s};let n=this.part;const o=t.split(".");return o.forEach((a,c)=>{c===o.length-1?n[a]||(n[a]=()=>i):n=this.part[a]=this.part[a]||{}}),this}get(){return this.part}}const _t=r=>{const t=new ue({});return r(t),t.get()};_t(r=>{r.createCommand("types.register",{scope:G.Implementation,stage:S.Pre},t=>(e,s)=>{t.container.get("$types")[e]=s}).createCommand("type",{stage:S.Pre},t=>e=>{t.container.register("$type",e)}).createCommand("settings",{stage:S.Pre,defaultArgs:[null]},t=>e=>{t.events.dispatch("settings:change",e,{bubbles:!0}),t.container.register("$settings",e)}).createCommand("plugin",{stage:S.Pre},t=>(e,s,i)=>{const{container:n}=t;let o=null,a=e,c=s;typeof e=="string"&&(o=e,a=s,c=i);const l=h=>{const{transformPluginSettings:p}=t.container.get("$environmentOptions"),d=p?p(c||{},o,t.container,a):s;try{const u=de(o,a,n,d);n.get("$plugins").push(u),h&&u.invoke("initialize",null)}catch(u){pe(t).warn("Error when initializing plugin",u)}};t.container.get("$instance")?l(!0):t.events.subscribeOnce("widget:instance-created",()=>l(!1))}).createCommand("container.register",t=>(e,s)=>{t.container.register(e,s)}).createCommand("container.registerAsync",t=>(e,s)=>{t.container.registerAsync(e,s)}).createCommand("container.registerFactory",t=>(e,s)=>{t.container.registerFactory(e,s)}).createCommand("container.touch",t=>(e,s)=>{t.container.touch(e,s)}).createCommand("csp",{},t=>e=>{t.container.register("csp",e)})});const tt=(r,t,...e)=>typeof t=="string"?r(`[humany] ${t}`,...e):r(t,...e),H=class{constructor(){this.keys=[],this.log=(t,...e)=>this.lookup(t,()=>H.log(...e)),this.warn=(t,...e)=>this.lookup(t,()=>H.warn(...e)),this.error=(t,...e)=>this.lookup(t,()=>H.error(...e)),this.info=(t,...e)=>this.lookup(t,()=>H.info(...e))}lookup(t,e){this.keys.indexOf(t)===-1&&(this.keys.push(t),e())}};let $=H;$.log=(...r)=>tt(console.log,...r);$.warn=(...r)=>tt(console.warn,...r);$.error=(...r)=>tt(console.error,...r);$.info=(...r)=>tt(console.info,...r);const Xt=r=>{let t={},e,s;if(typeof r!="object"||r===null)return r;t=Array.isArray(r)?[]:{};for(s in r)e=r[s],t[s]=typeof e=="object"&&e!==null?Xt(e):e;return t};function Ht(r){let t=0;if(r.length===0)return t.toString();for(let e=0;e<r.length;e++){const s=r.charCodeAt(e);t=(t<<5)-t+s,t=t&t}return t.toString()}let me=class{constructor(t,e){this.lockWarningTime=t,this.lockErrorTime=e,this.tasks=[],this.current=Promise.resolve(),this.next=this.next.bind(this)}add(t,e,s,i){this.tasks.push({task:t,resolve:e,reject:s,done:i}),this.next()}next(){this.current=this.current.then(()=>{const t=this.tasks.shift();if(t){let e;const s=setTimeout(()=>{process.env.NODE_ENV!=="production"&&$.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,t),e=setTimeout(()=>{t.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),i=Promise.resolve(t.task()).then(n=>(clearTimeout(s),clearTimeout(e),n));return Promise.resolve(i).then(this.next).then(()=>i.then(n=>{t.done(),t.resolve(n)})).catch(n=>(t.done(),t.reject(n),this.next()))}return Promise.resolve()})}};const F=new WeakMap;function et(r,t=5e3,e=1e3){return F.has(r)||F.set(r,new me(t,e)),s=>new Promise((i,n)=>{const o=F.get(r);o.add(s,i,n,()=>{o.tasks.length||F.delete(r)})})}const _=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function st(){return _()+_()+"-"+_()+"-"+_()+"-"+_()+"-"+_()+_()+_()}const ge=r=>{const t=[];return[(e,s)=>{t.push(r.subscribe(e,s))},()=>{t.forEach(e=>{e()})}]};let rt=class{constructor(t,e=[]){this.platform=t,this.rules=e}match(t){return this.rules.every(e=>!(e.id&&e.id!==t.id||e.type&&e.type!==t.type))}ofType(t){return this.rules.push({type:t}),this}withId(t){return this.rules.push({id:t}),this}select(){return new fe(this.platform,this)}},Yt=class{constructor(t,e,s){this.platform=t,this.node=e,this.actions=new At(t,new rt(t).withId(e.id),s);const[i,n]=ge(this.platform.events);this.subscribe=i,this.unsubscribe=n}properties(t){return t&&this.node.touchProperties(e=>t(e)),this.node.attributes.properties}context(t){return t&&this.subscribe("components:context-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.context)}),this.node.attributes.context}layout(t){return t&&this.subscribe("components:layout-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.layout)}),this.node.attributes.layout}writeProperties(t,e){this.node.writeProperties(t,e)}writeContext(t,e){this.node.writeProperties(t,e)}writeLayout(t,e){this.node.writeLayout(t,e)}dispose(){this.unsubscribe(),this.actions.dispose()}};class fe{constructor(t,e,s=!0){this.platform=t,this.target=e,this.clearOnDispose=s,this.removes=[],this.actions=new At(this.platform,this.target)}writeProperties(t,e){this.removes.push(this.platform.write({options:e,attributes:{properties:t},target:this.target,removable:this.clearOnDispose}))}writeContext(t,e){this.removes.push(this.platform.write({options:e,attributes:{context:t},target:this.target,removable:this.clearOnDispose}))}writeLayout(t,e){this.removes.push(this.platform.write({options:e,attributes:{layout:t},target:this.target,removable:this.clearOnDispose}))}dispose(){this.removes.forEach(t=>{t()}),this.actions.dispose()}}const ye=(r,t,e)=>{const s=r.concat(),i=(n,o,a)=>{let c=!0;if(s.length){const l=s.shift(),h=(p,d)=>(c=!1,i(p,Object.assign({},o,d),a));return Promise.resolve(l(n,h,a)).then(p=>({...p,cancelled:c}))}return Promise.resolve({data:n,cancelled:!1,options:o})};return i(t,{},e)};let At=class{constructor(t,e,s){this.platform=t,this.target=e,this.ns=s,this.subscriptions=[],this.create=this.create.bind(this)}create(t,e=()=>{}){const s={key:t,fn:e,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(s);const i=()=>{const n=this.platform.actionsState.handlers.indexOf(s);n>-1&&this.platform.actionsState.handlers.splice(n,1)};return this.subscriptions.push(i),i}dispatch(t,e){const s=this.platform.nodes.all.concat(this.platform.nodes.detached),i={},n=this.platform.actionsState.handlers.filter(o=>o.key===t&&(!o.ns||!this.ns||o.ns===this.ns));return Promise.all(n.map(o=>{const a=s.filter(l=>o.target.match(l)&&this.target.match(l)),c=this.platform.actionsState.watchers.filter(l=>l.key===t&&(!l.ns||!this.ns||l.ns===this.ns)&&a.some(h=>l.target.match(h))).map(l=>l.fn);return Promise.all(a.map(l=>{const h=new Yt(this.platform,l,this.ns);return ye(c,e,h).then(p=>{const{data:d={},options:u,cancelled:g}=p;return Promise.resolve(g?{}:o.fn(d,u,h)).then(j=>{i[l.id]=j})})}))})).then(()=>i)}watch(t,e){let s=t,i=this.ns;const n=t.split(".");n.length>1&&(i=n[0],s=n.splice(1).join("."));const o={fn:e,target:this.target,key:s,ns:i};this.platform.actionsState.watchers.push(o);const a=()=>{const c=this.platform.actionsState.watchers.indexOf(o);c>-1&&this.platform.actionsState.watchers.splice(c,1)};return this.subscriptions.push(a),a}dispose(){this.subscriptions.forEach(t=>t())}};_t(r=>{r.createCommand("components",t=>e=>{t.events.subscribeOnce("components:platform-created",(s,{platform:i})=>{e.handlers&&e.handlers.forEach(([n,o])=>{i.addComponentHandler(n,o)})})})});let Rt=class{constructor(t,e){this.events=t,this.tags=[],this.children={},this.changesets=[],this.mountCount=0,this.id=st(),this.type=e,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(t,e){let s=t.get("mounted-nodes");return s||(s=new Map,t.register("mounted-nodes",s)),s.has(this)?(process.env.NODE_ENV!=="production"&&$.error("Trying to mount an already mounted component node.",this),()=>{}):(this.events.dispatch("components:node-mounted",{node:this}),this.mountCount===0&&(this.mountCount=this.mountCount+1,this.events.dispatch("components:node-enter",{node:this})),()=>{s.delete(this),this.events.dispatch("components:node-unmounted",{node:this}),this.mountCount=this.mountCount-1,this.mountCount===0&&this.events.dispatch("components:node-exit",{node:this})})}appendChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].push(t),this.events.dispatch("components:node-appended",{node:t})}prependChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].unshift(t),this.events.dispatch("components:node-appended",{node:t})}touchProperties(t,e={},s){const i=[{properties:t},e];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(t,e={},s){const i=[{properties:t},e];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(t,e={},s){const i=[{layout:t},e];return this.changesets.push(i),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!s)return;const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(t,e={},s){const i=[{context:t},e];return this.changesets.push(i),this.events.dispatch("components:set-context",{node:this}),()=>{if(!s)return;const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(t="default"){const e=this.children[t]||[];return e.reduce((s,i,n)=>{const{order:o=n}=i.attributes.layout;return s[o]?s.splice(o,0,i):s[o]=i,s},Array(e.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(t){Object.keys(this.children).forEach(e=>{const s=this.children[e],i=s.indexOf(t);i>-1&&(s.splice(i,1),this.events.dispatch("components:node-removed",{node:t,parentNode:this}))}),delete t.parent}};const te=(r,t,e)=>{for(let s=0,i=r.length;s<i&&e(r[s])!==!0;s++){const n=t[r[s].id]||"default",o=r[s].getChildren(n);te(o,t,e)}},xt=(r,t,e)=>{if(e(r)!==!0){const s=t[r.id]||"default",i=r.children[s];te(i,t,e)}},pt=(r,t)=>{const e=[];return xt(r,t,s=>{e.push(s)}),e},$e=(r,t,e)=>{let s;return xt(r,t,i=>{if(e(i))return s=i,!0}),s};let ve=class{constructor(t,e,s){this.root=t,this.switches=e,this.all=[],this.visible=[],this.detached=[],s.subscribe("components:node-appended",(i,n)=>{this.all.push(n.node),this.visible=pt(t,e)}),s.subscribe("components:node-removed",(i,n)=>{let o=this.all.indexOf(n.node);o>-1&&this.all.splice(o,1),o=this.visible.indexOf(n.node),o>-1&&this.visible.splice(o,1),this.visible=pt(t,e)}),s.subscribe("components:node-switched",(i,n)=>{this.visible=pt(t,e)})}query(t={}){const e=[];return xt(this.root,this.switches,s=>{Object.keys(t).every(i=>t[i]===s[i])&&e.push(s)}),e}get(t){return $e(this.root,this.switches,e=>e.id===t)||this.detached.find(e=>e.id===t)}};class be{constructor(){this.handlers=new Map}add(t,e){this.handlers.set(t,e)}get(t){return this.handlers.get(t)}}const we=r=>{let t=r,e=0;for(;t.parent;)e=e+1,t=t.parent;return e},_e=r=>r.map(([t,e])=>[we(t),t,e]).sort(([t],[e])=>t-e).map(([,t,e])=>[t,e]),dt=r=>r instanceof Date?!1:r&&typeof r=="object"&&!Array.isArray(r),b=(r,...t)=>{if(!t.length)return r;const e=t.shift();if(dt(r)&&dt(e))for(const s in e)dt(e[s])?(r[s]||Object.assign(r,{[s]:{}}),b(r[s],e[s])):Object.assign(r,{[s]:e[s]});return b(r,...t)},Ae=(r,t)=>!r||r==="all"?!0:r.some(e=>t.indexOf(e)>-1),xe=(r,t)=>{let e=[],s=[],i;const n=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const a=new Map,c=_e(e.map((h,p)=>[h,s[p]])),l=(h,p)=>{var d;const u=a.get(h)||{},g=p.context&&!u.context,j=p.properties&&!u.properties,ct=p.layout&&!u.layout;a.set(h,{context:u.context||g,properties:u.properties||j,layout:u.layout||ct}),j&&(h.attributes.properties={}),ct&&(h.attributes.layout={}),g&&(h.attributes.context=b({},(d=h.parent)==null?void 0:d.attributes.context));const Mt=[],Dt=[],jt=[];if(h.changesets.forEach(v=>{const[y,ht]=v;Ae(ht.breakpoints,r.breakpoints)&&(j&&(typeof y.properties=="function"?Mt.push(y.properties):b(h.attributes.properties,y.properties)),ct&&(typeof y.layout=="function"?Dt.push(y.layout):b(h.attributes.layout,y.layout)),g&&(typeof y.context=="function"?jt.push(y.context):b(h.attributes.context,y.context)))}),Mt.forEach(v=>{b(h.attributes.properties,v(h.attributes.properties))}),Dt.forEach(v=>{b(h.attributes.layout,v(h.attributes.layout))}),jt.forEach(v=>{b(h.attributes.context,v(h.attributes.context))}),g||p.recursive){const v=r.getBranch(h),y=p.recursive?p:{context:!!g};h.getChildren(v).forEach(ht=>{l(ht,y)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),c.forEach(([h,p])=>{l(h,p)}),e=[],s=[],t(a)},o=()=>{clearTimeout(i),i=setTimeout(n,0)};return(a,c)=>{const l=e.indexOf(a);if(l>-1){const h=s[l];return c.context&&(h.context=!0),c.properties&&(h.properties=!0),c.layout&&(h.layout=!0),c.recursive&&(h.recursive=!0),o()}return e.push(a),s.push(c),o()}};class ee{constructor(t,e={}){this.providers=e,this.breakpoints=[],this.actionsState={handlers:[],watchers:[]},this.switches={},this.changesets=[],this.subscriptions=[],this.customComponentHandler=new be,this.events=t.events.createChild(this);const s=new Rt(this.events,"root");s.name=`root-${t.name}`,this.nodes=new ve(s,this.switches,this.events);const i=this.processNode=xe(this,n=>{const o=Array.from(n.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
1
|
+
"use strict";const lt=(r,t,e,...s)=>{const i=`[${r.get("$environment").name||"webprovisions"}] ${e}`;switch(t){case"info":console.info(i,...s);break;case"warning":console.warn(i,...s);break;case"error":console.error(i,...s);break}},pe=r=>{const t=r.container||r;return{info:(e,...s)=>lt(t,"info",e,...s),warn:(e,...s)=>lt(t,"warning",e,...s),error:(e,...s)=>lt(t,"error",e,...s)}};var G=(r=>(r.Implementation="implementation",r.Widget="widget",r))(G||{}),S=(r=>(r.Pre="pre",r.Post="post",r))(S||{});const de=(r,t,e,s)=>{try{const i=new t(e,s);return{name:r,invoke:(n,o)=>{let a;return i[n]&&(a=i[n].call(i,o)),Promise.resolve(a)},getInstance:()=>i}}catch(i){if(i.message&&i.message.indexOf("is not a constructor")>=0)return{name:r,invoke:n=>{let o;return n==="initialize"&&(o=t(e,s)),Promise.resolve(o)},getInstance:()=>t};throw i}};function It(r,t){return typeof r>"u"?t:r}class ue{constructor(t={}){this.part=t}createCommand(t,e,s){let i;typeof e=="function"?i={scope:G.Widget,stage:S.Post,defaultArgs:void 0,handlerResolver:e}:i={scope:It(e.scope,G.Widget),stage:It(e.stage,S.Post),defaultArgs:e.defaultArgs,handlerResolver:s};let n=this.part;const o=t.split(".");return o.forEach((a,c)=>{c===o.length-1?n[a]||(n[a]=()=>i):n=this.part[a]=this.part[a]||{}}),this}get(){return this.part}}const _t=r=>{const t=new ue({});return r(t),t.get()};_t(r=>{r.createCommand("types.register",{scope:G.Implementation,stage:S.Pre},t=>(e,s)=>{t.container.get("$types")[e]=s}).createCommand("type",{stage:S.Pre},t=>e=>{t.container.register("$type",e)}).createCommand("settings",{stage:S.Pre,defaultArgs:[null]},t=>e=>{t.events.dispatch("settings:change",e,{bubbles:!0}),t.container.register("$settings",e)}).createCommand("plugin",{stage:S.Pre},t=>(e,s,i)=>{const{container:n}=t;let o=null,a=e,c=s;typeof e=="string"&&(o=e,a=s,c=i);const l=h=>{const{transformPluginSettings:p}=t.container.get("$environmentOptions"),d=p?p(c||{},o,t.container,a):s;try{const u=de(o,a,n,d);n.get("$plugins").push(u),h&&u.invoke("initialize",null)}catch(u){pe(t).warn("Error when initializing plugin",u)}};t.container.get("$instance")?l(!0):t.events.subscribeOnce("widget:instance-created",()=>l(!1))}).createCommand("container.register",t=>(e,s)=>{t.container.register(e,s)}).createCommand("container.registerAsync",t=>(e,s)=>{t.container.registerAsync(e,s)}).createCommand("container.registerFactory",t=>(e,s)=>{t.container.registerFactory(e,s)}).createCommand("container.touch",t=>(e,s)=>{t.container.touch(e,s)}).createCommand("csp",{},t=>e=>{t.container.register("csp",e)})});const tt=(r,t,...e)=>typeof t=="string"?r(`[humany] ${t}`,...e):r(t,...e),H=class{constructor(){this.keys=[],this.log=(t,...e)=>this.lookup(t,()=>H.log(...e)),this.warn=(t,...e)=>this.lookup(t,()=>H.warn(...e)),this.error=(t,...e)=>this.lookup(t,()=>H.error(...e)),this.info=(t,...e)=>this.lookup(t,()=>H.info(...e))}lookup(t,e){this.keys.indexOf(t)===-1&&(this.keys.push(t),e())}};let y=H;y.log=(...r)=>tt(console.log,...r);y.warn=(...r)=>tt(console.warn,...r);y.error=(...r)=>tt(console.error,...r);y.info=(...r)=>tt(console.info,...r);const Xt=r=>{let t={},e,s;if(typeof r!="object"||r===null)return r;t=Array.isArray(r)?[]:{};for(s in r)e=r[s],t[s]=typeof e=="object"&&e!==null?Xt(e):e;return t};function Ht(r){let t=0;if(r.length===0)return t.toString();for(let e=0;e<r.length;e++){const s=r.charCodeAt(e);t=(t<<5)-t+s,t=t&t}return t.toString()}let me=class{constructor(t,e){this.lockWarningTime=t,this.lockErrorTime=e,this.tasks=[],this.current=Promise.resolve(),this.next=this.next.bind(this)}add(t,e,s,i){this.tasks.push({task:t,resolve:e,reject:s,done:i}),this.next()}next(){this.current=this.current.then(()=>{const t=this.tasks.shift();if(t){let e;const s=setTimeout(()=>{process.env.NODE_ENV!=="production"&&y.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,t),e=setTimeout(()=>{t.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),i=Promise.resolve(t.task()).then(n=>(clearTimeout(s),clearTimeout(e),n));return Promise.resolve(i).then(this.next).then(()=>i.then(n=>{t.done(),t.resolve(n)})).catch(n=>(t.done(),t.reject(n),this.next()))}return Promise.resolve()})}};const F=new WeakMap;function et(r,t=5e3,e=1e3){return F.has(r)||F.set(r,new me(t,e)),s=>new Promise((i,n)=>{const o=F.get(r);o.add(s,i,n,()=>{o.tasks.length||F.delete(r)})})}const _=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function st(){return _()+_()+"-"+_()+"-"+_()+"-"+_()+"-"+_()+_()+_()}const ge=r=>{const t=[];return[(e,s)=>{t.push(r.subscribe(e,s))},()=>{t.forEach(e=>{e()})}]};let rt=class{constructor(t,e=[]){this.platform=t,this.rules=e}match(t){return this.rules.every(e=>!(e.id&&e.id!==t.id||e.type&&e.type!==t.type))}ofType(t){return this.rules.push({type:t}),this}withId(t){return this.rules.push({id:t}),this}select(){return new fe(this.platform,this)}},Yt=class{constructor(t,e,s){this.platform=t,this.node=e,this.actions=new At(t,new rt(t).withId(e.id),s);const[i,n]=ge(this.platform.events);this.subscribe=i,this.unsubscribe=n}properties(t){return t&&this.node.touchProperties(e=>t(e)),this.node.attributes.properties}context(t){return t&&this.subscribe("components:context-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.context)}),this.node.attributes.context}layout(t){return t&&this.subscribe("components:layout-changed",(e,{node:s})=>{s===this.node&&t(this.node.attributes.layout)}),this.node.attributes.layout}writeProperties(t,e){this.node.writeProperties(t,e)}writeContext(t,e){this.node.writeProperties(t,e)}writeLayout(t,e){this.node.writeLayout(t,e)}dispose(){this.unsubscribe(),this.actions.dispose()}};class fe{constructor(t,e,s=!0){this.platform=t,this.target=e,this.clearOnDispose=s,this.removes=[],this.actions=new At(this.platform,this.target)}writeProperties(t,e){this.removes.push(this.platform.write({options:e,attributes:{properties:t},target:this.target,removable:this.clearOnDispose}))}writeContext(t,e){this.removes.push(this.platform.write({options:e,attributes:{context:t},target:this.target,removable:this.clearOnDispose}))}writeLayout(t,e){this.removes.push(this.platform.write({options:e,attributes:{layout:t},target:this.target,removable:this.clearOnDispose}))}dispose(){this.removes.forEach(t=>{t()}),this.actions.dispose()}}const ye=(r,t,e)=>{const s=r.concat(),i=(n,o,a)=>{let c=!0;if(s.length){const l=s.shift(),h=(p,d)=>(c=!1,i(p,Object.assign({},o,d),a));return Promise.resolve(l(n,h,a)).then(p=>({...p,cancelled:c}))}return Promise.resolve({data:n,cancelled:!1,options:o})};return i(t,{},e)};let At=class{constructor(t,e,s){this.platform=t,this.target=e,this.ns=s,this.subscriptions=[],this.create=this.create.bind(this)}create(t,e=()=>{}){const s={key:t,fn:e,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(s);const i=()=>{const n=this.platform.actionsState.handlers.indexOf(s);n>-1&&this.platform.actionsState.handlers.splice(n,1)};return this.subscriptions.push(i),i}dispatch(t,e){const s=this.platform.nodes.all.concat(this.platform.nodes.detached),i={},n=this.platform.actionsState.handlers.filter(o=>o.key===t&&(!o.ns||!this.ns||o.ns===this.ns));return Promise.all(n.map(o=>{const a=s.filter(l=>o.target.match(l)&&this.target.match(l)),c=this.platform.actionsState.watchers.filter(l=>l.key===t&&(!l.ns||!this.ns||l.ns===this.ns)&&a.some(h=>l.target.match(h))).map(l=>l.fn);return Promise.all(a.map(l=>{const h=new Yt(this.platform,l,this.ns);return ye(c,e,h).then(p=>{const{data:d={},options:u,cancelled:g}=p;return Promise.resolve(g?{}:o.fn(d,u,h)).then(j=>{i[l.id]=j})})}))})).then(()=>i)}watch(t,e){let s=t,i=this.ns;const n=t.split(".");n.length>1&&(i=n[0],s=n.splice(1).join("."));const o={fn:e,target:this.target,key:s,ns:i};this.platform.actionsState.watchers.push(o);const a=()=>{const c=this.platform.actionsState.watchers.indexOf(o);c>-1&&this.platform.actionsState.watchers.splice(c,1)};return this.subscriptions.push(a),a}dispose(){this.subscriptions.forEach(t=>t())}};_t(r=>{r.createCommand("components",t=>e=>{t.events.subscribeOnce("components:platform-created",(s,{platform:i})=>{e.handlers&&e.handlers.forEach(([n,o])=>{i.addComponentHandler(n,o)})})})});let Rt=class{constructor(t,e){this.events=t,this.tags=[],this.children={},this.changesets=[],this.mountCount=0,this.id=st(),this.type=e,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(t,e){let s=t.get("mounted-nodes");return s||(s=new Map,t.register("mounted-nodes",s)),s.has(this)?(process.env.NODE_ENV!=="production"&&y.error("Trying to mount an already mounted component node.",this),()=>{}):(this.events.dispatch("components:node-mounted",{node:this}),this.mountCount===0&&(this.mountCount=this.mountCount+1,this.events.dispatch("components:node-enter",{node:this})),()=>{s.delete(this),this.events.dispatch("components:node-unmounted",{node:this}),this.mountCount=this.mountCount-1,this.mountCount===0&&this.events.dispatch("components:node-exit",{node:this})})}appendChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].push(t),this.events.dispatch("components:node-appended",{node:t})}prependChild(t,e="default"){if(t.parent){if(t.parent===this)return;t.parent.removeChild(t)}t.parent=this,this.children[e]||(this.children[e]=[]),this.children[e].unshift(t),this.events.dispatch("components:node-appended",{node:t})}touchProperties(t,e={},s){const i=[{properties:t},e];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(t,e={},s){const i=[{properties:t},e];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(t,e={},s){const i=[{layout:t},e];return this.changesets.push(i),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!s)return;const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(t,e={},s){const i=[{context:t},e];return this.changesets.push(i),this.events.dispatch("components:set-context",{node:this}),()=>{if(!s)return;const n=this.changesets.indexOf(i);n>-1&&(this.changesets.splice(n,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(t="default"){const e=this.children[t]||[];return e.reduce((s,i,n)=>{const{order:o=n}=i.attributes.layout;return s[o]?s.splice(o,0,i):s[o]=i,s},Array(e.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(t){Object.keys(this.children).forEach(e=>{const s=this.children[e],i=s.indexOf(t);i>-1&&(s.splice(i,1),this.events.dispatch("components:node-removed",{node:t,parentNode:this}))}),delete t.parent}};const te=(r,t,e)=>{for(let s=0,i=r.length;s<i&&e(r[s])!==!0;s++){const n=t[r[s].id]||"default",o=r[s].getChildren(n);te(o,t,e)}},xt=(r,t,e)=>{if(e(r)!==!0){const s=t[r.id]||"default",i=r.children[s];te(i,t,e)}},pt=(r,t)=>{const e=[];return xt(r,t,s=>{e.push(s)}),e},$e=(r,t,e)=>{let s;return xt(r,t,i=>{if(e(i))return s=i,!0}),s};let ve=class{constructor(t,e,s){this.root=t,this.switches=e,this.all=[],this.visible=[],this.detached=[],s.subscribe("components:node-appended",(i,n)=>{this.all.push(n.node),this.visible=pt(t,e)}),s.subscribe("components:node-removed",(i,n)=>{let o=this.all.indexOf(n.node);o>-1&&this.all.splice(o,1),o=this.visible.indexOf(n.node),o>-1&&this.visible.splice(o,1),this.visible=pt(t,e)}),s.subscribe("components:node-switched",(i,n)=>{this.visible=pt(t,e)})}query(t={}){const e=[];return xt(this.root,this.switches,s=>{Object.keys(t).every(i=>t[i]===s[i])&&e.push(s)}),e}get(t){return $e(this.root,this.switches,e=>e.id===t)||this.detached.find(e=>e.id===t)}};class be{constructor(){this.handlers=new Map}add(t,e){this.handlers.set(t,e)}get(t){return this.handlers.get(t)}}const we=r=>{let t=r,e=0;for(;t.parent;)e=e+1,t=t.parent;return e},_e=r=>r.map(([t,e])=>[we(t),t,e]).sort(([t],[e])=>t-e).map(([,t,e])=>[t,e]),dt=r=>r instanceof Date?!1:r&&typeof r=="object"&&!Array.isArray(r),b=(r,...t)=>{if(!t.length)return r;const e=t.shift();if(dt(r)&&dt(e))for(const s in e)dt(e[s])?(r[s]||Object.assign(r,{[s]:{}}),b(r[s],e[s])):Object.assign(r,{[s]:e[s]});return b(r,...t)},Ae=(r,t)=>!r||r==="all"?!0:r.some(e=>t.indexOf(e)>-1),xe=(r,t)=>{let e=[],s=[],i;const n=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const a=new Map,c=_e(e.map((h,p)=>[h,s[p]])),l=(h,p)=>{var d;const u=a.get(h)||{},g=p.context&&!u.context,j=p.properties&&!u.properties,ct=p.layout&&!u.layout;a.set(h,{context:u.context||g,properties:u.properties||j,layout:u.layout||ct}),j&&(h.attributes.properties={}),ct&&(h.attributes.layout={}),g&&(h.attributes.context=b({},(d=h.parent)==null?void 0:d.attributes.context));const Mt=[],Dt=[],jt=[];if(h.changesets.forEach(v=>{const[$,ht]=v;Ae(ht.breakpoints,r.breakpoints)&&(j&&(typeof $.properties=="function"?Mt.push($.properties):b(h.attributes.properties,$.properties)),ct&&(typeof $.layout=="function"?Dt.push($.layout):b(h.attributes.layout,$.layout)),g&&(typeof $.context=="function"?jt.push($.context):b(h.attributes.context,$.context)))}),Mt.forEach(v=>{b(h.attributes.properties,v(h.attributes.properties))}),Dt.forEach(v=>{b(h.attributes.layout,v(h.attributes.layout))}),jt.forEach(v=>{b(h.attributes.context,v(h.attributes.context))}),g||p.recursive){const v=r.getBranch(h),$=p.recursive?p:{context:!!g};h.getChildren(v).forEach(ht=>{l(ht,$)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),c.forEach(([h,p])=>{l(h,p)}),e=[],s=[],t(a)},o=()=>{clearTimeout(i),i=setTimeout(n,0)};return(a,c)=>{const l=e.indexOf(a);if(l>-1){const h=s[l];return c.context&&(h.context=!0),c.properties&&(h.properties=!0),c.layout&&(h.layout=!0),c.recursive&&(h.recursive=!0),o()}return e.push(a),s.push(c),o()}};class ee{constructor(t,e={}){this.providers=e,this.breakpoints=[],this.actionsState={handlers:[],watchers:[]},this.switches={},this.changesets=[],this.subscriptions=[],this.customComponentHandler=new be,this.events=t.events.createChild(this);const s=new Rt(this.events,"root");s.name=`root-${t.name}`,this.nodes=new ve(s,this.switches,this.events);const i=this.processNode=xe(this,n=>{const o=Array.from(n.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
2
2
|
${o.map(a=>`${a.name||"<no name>"} (${a.id})
|
|
3
|
-
`)}`),o.forEach(a=>{const c=n.get(a);a.parent&&a.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:a}),c!=null&&c.context&&this.events.dispatch("components:context-changed",{node:a}),c!=null&&c.properties&&this.events.dispatch("components:properties-changed",{node:a}),c!=null&&c.layout&&this.events.dispatch("components:layout-changed",{node:a})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(e).map(n=>e[n].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(n,o)=>{const{node:a}=o;this.changesets.forEach(c=>{const{changeset:l,target:h,removes:p}=c,[d,u]=l;h.match(o.node)&&(d.properties&&p.push(a.writeProperties(d.properties,u)),d.context&&p.push(a.writeContext(d.context,u)),d.layout&&p.push(a.writeLayout(d.layout,u)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(n,o)=>{i(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(n,o)=>{i(o.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(n,o)=>{i(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(n,o)=>{i(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(n,o)=>{i(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(n,{node:o,branch:a})=>{i(o,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(n,{parentNode:o})=>{i(o,{properties:!0})})),this.events.parent&&this.events.parent.dispatch("components:platform-created",{platform:this})}static getInstance(t){return t.getAsync("components")}addBreakpoint(t){this.breakpoints.indexOf(t)===-1&&(this.breakpoints.push(t),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}removeBreakpoint(t){const e=this.breakpoints.indexOf(t);e>-1&&(this.breakpoints.splice(e,1),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}setSwitch(t,e){this.switches[t.id]=e,this.events.dispatch("components:node-switched",{node:t,branch:e})}getBranch(t){return this.switches[t.id]}createNode(t,e={}){const s=new Rt(this.events,t);return e.detached&&this.nodes.detached.push(s),s}components(){return new rt(this)}actions(t,e){return new At(this,t,e)}write(t){const{provider:e,target:s,attributes:i,options:n={},removable:o}=t,a=t.key||st(),c={changeset:[i,n],target:s,removes:[]};if(e){const l=this.providers[e];l.write(a,s,i,n),c.removes.push(()=>{l.remove(a)})}return this.changesets.push(c),this.nodes.all.forEach(l=>{if(s.match(l)){let h=()=>{};i.properties&&(h=l.writeProperties(i.properties,n,o)),i.context&&(h=l.writeContext(i.context,n,o)),i.layout&&(h=l.writeContext(i.layout,n,o)),c.removes.push(h)}}),()=>{if(o){c.removes.forEach(h=>h());const l=this.changesets.indexOf(c);l>-1&&this.changesets.splice(l,1)}}}addComponentHandler(t,e){this.customComponentHandler.add(t,e)}getComponentHandler(t){return this.customComponentHandler.get(t)}dispose(){this.subscriptions.forEach(t=>t())}}const Ee=(r,t)=>({id:r.id,type:r.type,name:r.name,branch:t||"default"}),Se=(r,t,e,s=st(),i={})=>r.getAsync("components").then(n=>{let o;{const l=new rt(n);l.ofType(t),o=l}const a={},c=l=>{const h=a[l.id];return h?Promise.resolve(h.controller):ee.getInstance(r).then(p=>new Yt(p,l,s))};n.events.subscribe("components:node-enter",(l,{node:h})=>{o.match(h)&&c(h).then(p=>{Promise.resolve(e(p)).then(d=>{a[h.id]={dispose:d,controller:p}})})}),n.events.subscribe("components:node-exit",(l,{node:h})=>{const p=a[h.id];p&&(p.dispose&&p.dispose(),i.reuseController||(p.controller.dispose(),delete a[h.id]))})});var w=(r=>(r.Cookie="cookie",r.Local="local",r.Session="session",r))(w||{}),Et=(r=>(r.Tenant="tenant",r.Implementation="implementation",r.Widget="widget",r))(Et||{}),f=(r=>(r.Necessary="necessary",r.Functional="functional",r.Analytical="analytical",r.Marketing="marketing",r))(f||{});const Ce=(r,t,e,s={})=>Lt(r,e).then(i=>(process.env.NODE_ENV!=="production"&&i
|
|
3
|
+
`)}`),o.forEach(a=>{const c=n.get(a);a.parent&&a.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:a}),c!=null&&c.context&&this.events.dispatch("components:context-changed",{node:a}),c!=null&&c.properties&&this.events.dispatch("components:properties-changed",{node:a}),c!=null&&c.layout&&this.events.dispatch("components:layout-changed",{node:a})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(e).map(n=>e[n].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(n,o)=>{const{node:a}=o;this.changesets.forEach(c=>{const{changeset:l,target:h,removes:p}=c,[d,u]=l;h.match(o.node)&&(d.properties&&p.push(a.writeProperties(d.properties,u)),d.context&&p.push(a.writeContext(d.context,u)),d.layout&&p.push(a.writeLayout(d.layout,u)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(n,o)=>{i(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(n,o)=>{i(o.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(n,o)=>{i(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(n,o)=>{i(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(n,o)=>{i(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(n,{node:o,branch:a})=>{i(o,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(n,{parentNode:o})=>{i(o,{properties:!0})})),this.events.parent&&this.events.parent.dispatch("components:platform-created",{platform:this})}static getInstance(t){return t.getAsync("components")}addBreakpoint(t){this.breakpoints.indexOf(t)===-1&&(this.breakpoints.push(t),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}removeBreakpoint(t){const e=this.breakpoints.indexOf(t);e>-1&&(this.breakpoints.splice(e,1),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}setSwitch(t,e){this.switches[t.id]=e,this.events.dispatch("components:node-switched",{node:t,branch:e})}getBranch(t){return this.switches[t.id]}createNode(t,e={}){const s=new Rt(this.events,t);return e.detached&&this.nodes.detached.push(s),s}components(){return new rt(this)}actions(t,e){return new At(this,t,e)}write(t){const{provider:e,target:s,attributes:i,options:n={},removable:o}=t,a=t.key||st(),c={changeset:[i,n],target:s,removes:[]};if(e){const l=this.providers[e];l.write(a,s,i,n),c.removes.push(()=>{l.remove(a)})}return this.changesets.push(c),this.nodes.all.forEach(l=>{if(s.match(l)){let h=()=>{};i.properties&&(h=l.writeProperties(i.properties,n,o)),i.context&&(h=l.writeContext(i.context,n,o)),i.layout&&(h=l.writeContext(i.layout,n,o)),c.removes.push(h)}}),()=>{if(o){c.removes.forEach(h=>h());const l=this.changesets.indexOf(c);l>-1&&this.changesets.splice(l,1)}}}addComponentHandler(t,e){this.customComponentHandler.add(t,e)}getComponentHandler(t){return this.customComponentHandler.get(t)}dispose(){this.subscriptions.forEach(t=>t())}}const Ee=(r,t)=>({id:r.id,type:r.type,name:r.name,branch:t||"default"}),Se=(r,t,e,s=st(),i={})=>r.getAsync("components").then(n=>{let o;{const l=new rt(n);l.ofType(t),o=l}const a={},c=l=>{const h=a[l.id];return h?Promise.resolve(h.controller):ee.getInstance(r).then(p=>new Yt(p,l,s))};n.events.subscribe("components:node-enter",(l,{node:h})=>{o.match(h)&&c(h).then(p=>{Promise.resolve(e(p)).then(d=>{a[h.id]={dispose:d,controller:p}})})}),n.events.subscribe("components:node-exit",(l,{node:h})=>{const p=a[h.id];p&&(p.dispose&&p.dispose(),i.reuseController||(p.controller.dispose(),delete a[h.id]))})});var w=(r=>(r.Cookie="cookie",r.Local="local",r.Session="session",r))(w||{}),Et=(r=>(r.Tenant="tenant",r.Implementation="implementation",r.Widget="widget",r))(Et||{}),f=(r=>(r.Necessary="necessary",r.Functional="functional",r.Analytical="analytical",r.Marketing="marketing",r))(f||{});const Ce=(r,t,e,s={})=>Lt(r,e).then(i=>(process.env.NODE_ENV!=="production"&&i&&y.warn(`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
4
4
|
Key: ${t}
|
|
5
5
|
Category: ${JSON.stringify(e)}
|
|
6
|
-
Options: ${JSON.stringify(s)}`),n=>(Ct(r),Lt(r,e).then(o=>{if(o){process.env.NODE_ENV!=="production"
|
|
6
|
+
Options: ${JSON.stringify(s)}`),n=>(Ct(r),Lt(r,e).then(o=>{if(o){process.env.NODE_ENV!=="production"&&y.warn(`storageWriter: Attempted to write to storage using unallowed category.
|
|
7
7
|
Key: ${t}
|
|
8
8
|
Category: ${JSON.stringify(e)}
|
|
9
9
|
Value: ${JSON.stringify(n)}
|
|
10
|
-
Options: ${JSON.stringify(s)}`);return}const{scope:a=Et.Widget,medium:c=w.Session,duration:l}=s,h=ke();return h[a][t]=ie(n,e,l),c===w.Cookie?De(r,h):Ie(r,c,h)})))),Oe=(r,t,e=w.Session)=>(Ct(r),e===w.Cookie?Me(r).then(s=>wt(s,t)):je(r,e).then(s=>wt(s,t))),U=r=>!!Object.entries(r).filter(([t,e])=>typeof e<"u").length,ut=r=>Object.entries(r).filter(([t,e])=>typeof e<"u").forEach(([t,{value:e}])=>{typeof e>"u"&&delete r[t]}),se=(r,t)=>{const e={tenant:{...r.tenant,...t.tenant},implementation:{...r.implementation,...t.implementation},widget:{...r.widget,...t.widget}};return ut(e.tenant),ut(e.implementation),ut(e.widget),e},Pe=r=>Object.entries(r).reduce((t,e)=>{const[s,i]=e;return Object.entries(i).forEach(n=>{const[o,{expiration:a}]=n;a&&t.push(a)}),t},[]).slice().sort((t,e)=>new Date(e).valueOf()-new Date(t).valueOf()).shift()||Ot(),it=r=>{const{name:t,implementation:{name:e,tenant:s}}=r.get("$widget");return[`humany_${s}`,`humany_${Ht(s+e)}`,`humany_${Ht(s+e+t)}`]},mt=r=>{const t=new RegExp(`(?:^|;)\\s?${r}=(.*?)(?:;|$)`,"i"),e=document.cookie.match(t);return e&&e[1]&&JSON.parse(e[1])||void 0},gt=(r,t,e)=>{const s=`${r}=${JSON.stringify(t).trim()}`,i=`expires=${new Date(e).toUTCString()}`,n="path=/",o="SameSite=None;Secure";return document.cookie=`${s}; ${i}; ${n}; ${o}`},St=r=>{const[t,e,s]=it(r),i=mt(t)||{},n=mt(e)||{},o=mt(s)||{};return{tenant:i,implementation:n,widget:o}},re=(r,t)=>{const e=St(r),s=se(e,t),[i,n,o]=it(r),{tenant:a,implementation:c,widget:l}=s,h=Pe(t),p=Ot({days:-1});gt(i,a,U(a)?h:p),gt(n,c,U(c)?h:p),gt(o,l,U(l)?h:p)},Q=(r,t)=>{const[e,s,i]=it(r),n=t.getItem(e)||"{}",o=t.getItem(s)||"{}",a=t.getItem(i)||"{}";return{tenant:JSON.parse(n),implementation:JSON.parse(o),widget:JSON.parse(a)}},bt=(r,t,e)=>{const s=Q(r,t),i=se(s,e),[n,o,a]=it(r),{tenant:c,implementation:l,widget:h}=i;U(c)?t.setItem(n,JSON.stringify(c)):t.removeItem(n),U(l)?t.setItem(o,JSON.stringify(l)):t.removeItem(o),U(h)?t.setItem(a,JSON.stringify(h)):t.removeItem(a);const{events:p}=r.get("$widget");p.dispatch("storage:changed",{})},ke=()=>({tenant:{},implementation:{},widget:{}}),Ne=r=>r?!!r&&new Date>new Date(r):!1,wt=(r,t)=>{const e=r.widget[t]||r.implementation[t]||r.tenant[t];return e==null?void 0:e.value},ie=(r,t,e)=>e?{value:r,category:t,expiration:typeof e=="object"?Ot(e):e}:{value:r,category:t},Te=(r,t)=>{const e=Xt(r);return Object.entries(e).forEach(([s,i])=>{Object.entries(i).forEach(([n,o])=>{const{expiration:a,category:c}=o;(Ne(a)||Ue(t,c))&&(i[n]=ie(void 0,c,a))})}),e},Lt=(r,t)=>Oe(r,"storagePolicy",w.Cookie).then((e=[f.Necessary])=>!!t&&e.indexOf(t)===-1),Ue=(r=[f.Necessary],t)=>!!t&&r.indexOf(t)===-1,Ct=r=>{const t=St(r),e=Q(r,window.localStorage),s=Q(r,sessionStorage),i=wt(t,"storagePolicy"),[n,o,a]=[t,e,s].map(c=>Te(c,i));re(r,n),bt(r,window.localStorage,o),bt(r,window.sessionStorage,a)},Ot=(r={days:30})=>{const{days:t=0,hours:e=0,minutes:s=0,seconds:i=0}=r,n=new Date;return n.setTime(n.getTime()+e*60*60*1e3),n.setTime(n.getTime()+t*24*60*60*1e3),n.setTime(n.getTime()+s*60*1e3),n.setTime(n.getTime()+i*1e3),n.toISOString()},Me=r=>et(document)(()=>St(r)),De=(r,t)=>et(document)(()=>re(r,t)),je=(r,t)=>{const e=t===w.Local?window.localStorage:window.sessionStorage;return et(e)(()=>Q(r,e))},Ie=(r,t,e)=>{const s=t===w.Local?window.localStorage:window.sessionStorage;return et(s)(()=>bt(r,s,e))};_t(r=>{r.createCommand("storage",t=>(e={})=>{const{consent:s}=e;if(typeof s<"u"){if(typeof s!="number"&&typeof s!="string"&&!Array.isArray(s)){process.env.NODE_ENV!=="production"
|
|
11
|
-
Passed consent: ${JSON.stringify(s)}`);return}if(Array.isArray(s)&&!s.every(n=>typeof n=="number"||typeof n=="string")){process.env.NODE_ENV!=="production"
|
|
12
|
-
Passed consent: ${JSON.stringify(s)}`);return}const i=[f.Necessary,f.Functional,f.Analytical,f.Marketing].filter((n,o,a)=>typeof s=="number"?s>o:typeof s=="string"?a.indexOf(s)+1>o:Array.isArray(s)?s.findIndex(c=>c===o+1||c===n)>-1:!0);return i.indexOf(f.Necessary)===-1&&(process.env.NODE_ENV!=="production"
|
|
10
|
+
Options: ${JSON.stringify(s)}`);return}const{scope:a=Et.Widget,medium:c=w.Session,duration:l}=s,h=ke();return h[a][t]=ie(n,e,l),c===w.Cookie?De(r,h):Ie(r,c,h)})))),Oe=(r,t,e=w.Session)=>(Ct(r),typeof t>"u"?(process.env.NODE_ENV!=="production"&&y.warn("readStorage: Undefined key passed when reading storage. ",t,e),Promise.resolve(void 0)):e===w.Cookie?Me(r).then(s=>wt(s,t)):je(r,e).then(s=>wt(s,t))),U=r=>!!Object.entries(r).filter(([t,e])=>typeof e<"u").length,ut=r=>Object.entries(r).filter(([t,e])=>typeof e<"u").forEach(([t,{value:e}])=>{typeof e>"u"&&delete r[t]}),se=(r,t)=>{const e={tenant:{...r.tenant,...t.tenant},implementation:{...r.implementation,...t.implementation},widget:{...r.widget,...t.widget}};return ut(e.tenant),ut(e.implementation),ut(e.widget),e},Pe=r=>Object.entries(r).reduce((t,e)=>{const[s,i]=e;return Object.entries(i).forEach(n=>{const[o,{expiration:a}]=n;a&&t.push(a)}),t},[]).slice().sort((t,e)=>new Date(e).valueOf()-new Date(t).valueOf()).shift()||Ot(),it=r=>{const{name:t,implementation:{name:e,tenant:s}}=r.get("$widget");return[`humany_${s}`,`humany_${Ht(s+e)}`,`humany_${Ht(s+e+t)}`]},mt=r=>{const t=new RegExp(`(?:^|;)\\s?${r}=(.*?)(?:;|$)`,"i"),e=document.cookie.match(t);return e&&e[1]&&JSON.parse(e[1])||void 0},gt=(r,t,e)=>{const s=`${r}=${JSON.stringify(t).trim()}`,i=`expires=${new Date(e).toUTCString()}`,n="path=/",o="SameSite=None;Secure";return document.cookie=`${s}; ${i}; ${n}; ${o}`},St=r=>{const[t,e,s]=it(r),i=mt(t)||{},n=mt(e)||{},o=mt(s)||{};return{tenant:i,implementation:n,widget:o}},re=(r,t)=>{const e=St(r),s=se(e,t),[i,n,o]=it(r),{tenant:a,implementation:c,widget:l}=s,h=Pe(t),p=Ot({days:-1});gt(i,a,U(a)?h:p),gt(n,c,U(c)?h:p),gt(o,l,U(l)?h:p)},Q=(r,t)=>{const[e,s,i]=it(r),n=t.getItem(e)||"{}",o=t.getItem(s)||"{}",a=t.getItem(i)||"{}";return{tenant:JSON.parse(n),implementation:JSON.parse(o),widget:JSON.parse(a)}},bt=(r,t,e)=>{const s=Q(r,t),i=se(s,e),[n,o,a]=it(r),{tenant:c,implementation:l,widget:h}=i;U(c)?t.setItem(n,JSON.stringify(c)):t.removeItem(n),U(l)?t.setItem(o,JSON.stringify(l)):t.removeItem(o),U(h)?t.setItem(a,JSON.stringify(h)):t.removeItem(a);const{events:p}=r.get("$widget");p.dispatch("storage:changed",{})},ke=()=>({tenant:{},implementation:{},widget:{}}),Ne=r=>r?!!r&&new Date>new Date(r):!1,wt=(r,t)=>{const e=r.widget[t]||r.implementation[t]||r.tenant[t];return e==null?void 0:e.value},ie=(r,t,e)=>e?{value:r,category:t,expiration:typeof e=="object"?Ot(e):e}:{value:r,category:t},Te=(r,t)=>{const e=Xt(r);return Object.entries(e).forEach(([s,i])=>{Object.entries(i).forEach(([n,o])=>{const{expiration:a,category:c}=o;(Ne(a)||Ue(t,c))&&(i[n]=ie(void 0,c,a))})}),e},Lt=(r,t)=>Oe(r,"storagePolicy",w.Cookie).then((e=[f.Necessary])=>!!t&&e.indexOf(t)===-1),Ue=(r=[f.Necessary],t)=>!!t&&r.indexOf(t)===-1,Ct=r=>{const t=St(r),e=Q(r,window.localStorage),s=Q(r,sessionStorage),i=wt(t,"storagePolicy"),[n,o,a]=[t,e,s].map(c=>Te(c,i));re(r,n),bt(r,window.localStorage,o),bt(r,window.sessionStorage,a)},Ot=(r={days:30})=>{const{days:t=0,hours:e=0,minutes:s=0,seconds:i=0}=r,n=new Date;return n.setTime(n.getTime()+e*60*60*1e3),n.setTime(n.getTime()+t*24*60*60*1e3),n.setTime(n.getTime()+s*60*1e3),n.setTime(n.getTime()+i*1e3),n.toISOString()},Me=r=>et(document)(()=>St(r)),De=(r,t)=>et(document)(()=>re(r,t)),je=(r,t)=>{const e=t===w.Local?window.localStorage:window.sessionStorage;return et(e)(()=>Q(r,e))},Ie=(r,t,e)=>{const s=t===w.Local?window.localStorage:window.sessionStorage;return et(s)(()=>bt(r,s,e))};_t(r=>{r.createCommand("storage",t=>(e={})=>{const{consent:s}=e;if(typeof s<"u"){if(typeof s!="number"&&typeof s!="string"&&!Array.isArray(s)){process.env.NODE_ENV!=="production"&&y.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
11
|
+
Passed consent: ${JSON.stringify(s)}`);return}if(Array.isArray(s)&&!s.every(n=>typeof n=="number"||typeof n=="string")){process.env.NODE_ENV!=="production"&&y.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
12
|
+
Passed consent: ${JSON.stringify(s)}`);return}const i=[f.Necessary,f.Functional,f.Analytical,f.Marketing].filter((n,o,a)=>typeof s=="number"?s>o:typeof s=="string"?a.indexOf(s)+1>o:Array.isArray(s)?s.findIndex(c=>c===o+1||c===n)>-1:!0);return i.indexOf(f.Necessary)===-1&&(process.env.NODE_ENV!=="production"&&y.warn(`storagePolicyConfigurationApi: passed consent does not include category: '${f.Necessary}'. Consent has to atleast include the '${f.Necessary}' category.
|
|
13
13
|
Passed consent: ${JSON.stringify(s)}`),i.unshift(f.Necessary)),Ce(t.container,"storagePolicy",f.Necessary,{medium:w.Cookie,scope:Et.Tenant,duration:{days:365}}).then(n=>n(i)).then(()=>{Ct(t.container),t.events.dispatch("storage:policy-changed",i)})}})});/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2019 Google LLC
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/const{is:Le,defineProperty:Be,getOwnPropertyDescriptor:ze,getOwnPropertyNames:We,getOwnPropertySymbols:Ve,getPrototypeOf:Je}=Object,x=globalThis,Wt=x.trustedTypes,qe=Wt?Wt.emptyScript:"",ft=x.reactiveElementPolyfillSupport,L=(r,t)=>r,X={toAttribute(r,t){switch(t){case Boolean:r=r?qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Nt=(r,t)=>!Le(r,t),Vt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:Nt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let T=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Be(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=ze(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);n==null||n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;const t=Je(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(L("properties"))){const e=this.properties,s=[...We(e),...Ve(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(zt(i))}else t!==void 0&&e.push(zt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Re(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:X;this._$Em=i
|
|
21
|
+
*/const{is:Le,defineProperty:Be,getOwnPropertyDescriptor:ze,getOwnPropertyNames:We,getOwnPropertySymbols:Ve,getPrototypeOf:Je}=Object,x=globalThis,Wt=x.trustedTypes,qe=Wt?Wt.emptyScript:"",ft=x.reactiveElementPolyfillSupport,L=(r,t)=>r,X={toAttribute(r,t){switch(t){case Boolean:r=r?qe:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Nt=(r,t)=>!Le(r,t),Vt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:Nt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),x.litPropertyMetadata??(x.litPropertyMetadata=new WeakMap);let T=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Be(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=ze(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const a=i==null?void 0:i.call(this);n==null||n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(L("elementProperties")))return;const t=Je(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(L("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(L("properties"))){const e=this.properties,s=[...We(e),...Ve(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(zt(i))}else t!==void 0&&e.push(zt(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Re(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const a=s.getPropertyOptions(i),c=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:X;this._$Em=i;const l=c.fromAttribute(e,a.type);this[i]=l??((o=this._$Ej)==null?void 0:o.get(i))??l,this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){const n=this.constructor,o=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??Nt)(o,e)||s.useDefault&&s.reflect&&o===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,o]of i){const{wrapped:a}=o,c=this[n];a!==!0||this._$AL.has(n)||c===void 0||this.C(n,void 0,o,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};T.elementStyles=[],T.shadowRootOptions={mode:"open"},T[L("elementProperties")]=new Map,T[L("finalized")]=new Map,ft==null||ft({ReactiveElement:T}),(x.reactiveElementVersions??(x.reactiveElementVersions=[])).push("2.1.1");/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
25
|
*/const B=globalThis,Y=B.trustedTypes,Jt=Y?Y.createPolicy("lit-html",{createHTML:r=>r}):void 0,ae="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,ce="?"+A,Fe=`<${ce}>`,P=document,z=()=>P.createComment(""),W=r=>r===null||typeof r!="object"&&typeof r!="function",Tt=Array.isArray,Ke=r=>Tt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",yt=`[
|
|
26
26
|
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qt=/-->/g,Ft=/>/g,E=RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
|
|
27
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Zt=/"/g,he=/^(?:script|style|textarea|title)$/i,Ze=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),R=Ze(1),k=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Gt=new WeakMap,C=P.createTreeWalker(P,129);function le(r,t){if(!Tt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(t):t}const Ge=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=I;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,d=0;for(;d<c.length&&(o.lastIndex=d,h=o.exec(c),h!==null);)d=o.lastIndex,o===I?h[1]==="!--"?o=qt:h[1]!==void 0?o=Ft:h[2]!==void 0?(he.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=E):h[3]!==void 0&&(o=E):o===E?h[0]===">"?(o=i??I,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?E:h[3]==='"'?Zt:Kt):o===Zt||o===Kt?o=E:o===qt||o===Ft?o=I:(o=E,i=void 0);const u=o===E&&r[a+1].startsWith("/>")?" ":"";n+=o===I?c+Fe:p>=0?(s.push(l),c.slice(0,p)+ae+c.slice(p)+A+u):c+A+(p===-2?a:u)}return[le(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class V{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=Ge(t,e);if(this.el=V.createElement(l,s),C.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=C.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(ae)){const d=h[o++],u=i.getAttribute(p).split(A),g=/([.?@])?(.*)/.exec(d);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Xe:g[1]==="?"?Ye:g[1]==="@"?ts:nt}),i.removeAttribute(p)}else p.startsWith(A)&&(c.push({type:6,index:n}),i.removeAttribute(p));if(he.test(i.tagName)){const p=i.textContent.split(A),d=p.length-1;if(d>0){i.textContent=Y?Y.emptyScript:"";for(let u=0;u<d;u++)i.append(p[u],z()),C.nextNode(),c.push({type:2,index:++n});i.append(p[d],z())}}}else if(i.nodeType===8)if(i.data===ce)c.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(A,p+1))!==-1;)c.push({type:7,index:n}),p+=A.length-1}n++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function D(r,t,e=r,s){var o,a;if(t===k)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=W(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=D(r,i._$AS(r,t.values),i,s)),t}class Qe{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??P).importNode(e,!0);C.currentNode=i;let n=C.nextNode(),o=0,a=0,c=s[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new J(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new es(n,this,t)),this._$AV.push(l),c=s[++a]}o!==(c==null?void 0:c.index)&&(n=C.nextNode(),o++)}return C.currentNode=P,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class J{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=D(this,t,e),W(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==k&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ke(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(le(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Qe(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new V(t)),e}k(t){Tt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new J(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t
|
|
27
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Zt=/"/g,he=/^(?:script|style|textarea|title)$/i,Ze=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),R=Ze(1),k=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Gt=new WeakMap,C=P.createTreeWalker(P,129);function le(r,t){if(!Tt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Jt!==void 0?Jt.createHTML(t):t}const Ge=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=I;for(let a=0;a<e;a++){const c=r[a];let l,h,p=-1,d=0;for(;d<c.length&&(o.lastIndex=d,h=o.exec(c),h!==null);)d=o.lastIndex,o===I?h[1]==="!--"?o=qt:h[1]!==void 0?o=Ft:h[2]!==void 0?(he.test(h[2])&&(i=RegExp("</"+h[2],"g")),o=E):h[3]!==void 0&&(o=E):o===E?h[0]===">"?(o=i??I,p=-1):h[1]===void 0?p=-2:(p=o.lastIndex-h[2].length,l=h[1],o=h[3]===void 0?E:h[3]==='"'?Zt:Kt):o===Zt||o===Kt?o=E:o===qt||o===Ft?o=I:(o=E,i=void 0);const u=o===E&&r[a+1].startsWith("/>")?" ":"";n+=o===I?c+Fe:p>=0?(s.push(l),c.slice(0,p)+ae+c.slice(p)+A+u):c+A+(p===-2?a:u)}return[le(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class V{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,c=this.parts,[l,h]=Ge(t,e);if(this.el=V.createElement(l,s),C.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=C.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(ae)){const d=h[o++],u=i.getAttribute(p).split(A),g=/([.?@])?(.*)/.exec(d);c.push({type:1,index:n,name:g[2],strings:u,ctor:g[1]==="."?Xe:g[1]==="?"?Ye:g[1]==="@"?ts:nt}),i.removeAttribute(p)}else p.startsWith(A)&&(c.push({type:6,index:n}),i.removeAttribute(p));if(he.test(i.tagName)){const p=i.textContent.split(A),d=p.length-1;if(d>0){i.textContent=Y?Y.emptyScript:"";for(let u=0;u<d;u++)i.append(p[u],z()),C.nextNode(),c.push({type:2,index:++n});i.append(p[d],z())}}}else if(i.nodeType===8)if(i.data===ce)c.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(A,p+1))!==-1;)c.push({type:7,index:n}),p+=A.length-1}n++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function D(r,t,e=r,s){var o,a;if(t===k)return t;let i=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=W(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=D(r,i._$AS(r,t.values),i,s)),t}class Qe{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??P).importNode(e,!0);C.currentNode=i;let n=C.nextNode(),o=0,a=0,c=s[0];for(;c!==void 0;){if(o===c.index){let l;c.type===2?l=new J(n,n.nextSibling,this,t):c.type===1?l=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(l=new es(n,this,t)),this._$AV.push(l),c=s[++a]}o!==(c==null?void 0:c.index)&&(n=C.nextNode(),o++)}return C.currentNode=P,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class J{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=D(this,t,e),W(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==k&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ke(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==m&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(le(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const o=new Qe(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=Gt.get(t.strings);return e===void 0&&Gt.set(t.strings,e=new V(t)),e}k(t){Tt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new J(this.O(z()),this.O(z()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=D(this,t,e,0),o=!W(t)||t!==this._$AH&&t!==k,o&&(this._$AH=t);else{const a=t;let c,l;for(t=n[0],c=0;c<n.length-1;c++)l=D(this,a[s+c],e,c),l===k&&(l=this._$AH[c]),o||(o=!W(l)||l!==this._$AH[c]),l===m?t=m:t!==m&&(t+=(l??"")+n[c+1]),this._$AH[c]=l}o&&!i&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Xe extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}}class Ye extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==m)}}class ts extends nt{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=D(this,t,e,0)??m)===k)return;const s=this._$AH,i=t===m&&s!==m||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==m&&(s===m||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class es{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const $t=B.litHtmlPolyfillSupport;$t==null||$t(V,J),(B.litHtmlVersions??(B.litHtmlVersions=[])).push("3.3.1");const ss=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new J(t.insertBefore(z(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const O=globalThis;let M=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ss(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return k}};var Qt;M._$litElement$=!0,M.finalized=!0,(Qt=O.litElementHydrateSupport)==null||Qt.call(O,{LitElement:M});const vt=O.litElementPolyfillSupport;vt==null||vt({LitElement:M});(O.litElementVersions??(O.litElementVersions=[])).push("4.2.
|
|
31
|
+
*/const O=globalThis;let M=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=ss(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return k}};var Qt;M._$litElement$=!0,M.finalized=!0,(Qt=O.litElementHydrateSupport)==null||Qt.call(O,{LitElement:M});const vt=O.litElementPolyfillSupport;vt==null||vt({LitElement:M});(O.litElementVersions??(O.litElementVersions=[])).push("4.2.1");/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -151,4 +151,4 @@
|
|
|
151
151
|
align-items: center;
|
|
152
152
|
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
|
153
153
|
}
|
|
154
|
-
`];let N=Ut;q([ot({attribute:!1})],N.prototype,"symbol");q([ot({attribute:!1})],N.prototype,"container");q([at()],N.prototype,"active");q([at()],N.prototype,"loaded");q([at()],N.prototype,"icon");const ps=async(r,t)=>{const e=r.properties().provider;let s={},i="";Array.isArray(e)?(i=e[0],s=e[1]):i=e||"";const n=await t.getAsync(i);if(!n)throw new Error("No provider defined in ListComponent");return n.applyComponentNodeSettings(r.node.id,s),{provider:n,settings:s}},ds=async(r,t)=>{const{provider:e,settings:s={}}=await ps(r,t);return{addResource:(i,n)=>e.addResource(i,n),getData:(i,n)=>e.getData(i,n,s)}},us=(r,t,e,s,i)=>r.getAsync("componentResolver").then(n=>(n.registerComponent(t,e),Se(r,t,s||(()=>{}),t,i))),ms=r=>us(r,"list",Promise.resolve().then(()=>require("./list-
|
|
154
|
+
`];let N=Ut;q([ot({attribute:!1})],N.prototype,"symbol");q([ot({attribute:!1})],N.prototype,"container");q([at()],N.prototype,"active");q([at()],N.prototype,"loaded");q([at()],N.prototype,"icon");const ps=async(r,t)=>{const e=r.properties().provider;let s={},i="";Array.isArray(e)?(i=e[0],s=e[1]):i=e||"";const n=await t.getAsync(i);if(!n)throw new Error("No provider defined in ListComponent");return n.applyComponentNodeSettings(r.node.id,s),{provider:n,settings:s}},ds=async(r,t)=>{const{provider:e,settings:s={}}=await ps(r,t);return{addResource:(i,n)=>e.addResource(i,n),getData:(i,n)=>e.getData(i,n,s)}},us=(r,t,e,s,i)=>r.getAsync("componentResolver").then(n=>(n.registerComponent(t,e),Se(r,t,s||(()=>{}),t,i))),ms=r=>us(r,"list",Promise.resolve().then(()=>require("./list-CjHULeES.js")),t=>{(async()=>{t.writeProperties({loading:!0,items:[],totalItems:0});const i=await(await ds(t,r)).getData("items",{});t.writeProperties({loading:!1,items:(i==null?void 0:i.items)||[],totalItems:(i==null?void 0:i.totalItems)||0})})()});exports.E=m;exports.ListComponent=ms;exports.N=rt;exports.dt=Ee;exports.et=ee;exports.et$1=st;exports.i=oe;exports.i$1=M;exports.n=ot;exports.r=at;exports.x=R;
|
|
@@ -165,11 +165,11 @@ const tt = (r, t, ...e) => typeof t == "string" ? r(`[humany] ${t}`, ...e) : r(t
|
|
|
165
165
|
this.keys.indexOf(t) === -1 && (this.keys.push(t), e());
|
|
166
166
|
}
|
|
167
167
|
};
|
|
168
|
-
let
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
let y = I;
|
|
169
|
+
y.log = (...r) => tt(console.log, ...r);
|
|
170
|
+
y.warn = (...r) => tt(console.warn, ...r);
|
|
171
|
+
y.error = (...r) => tt(console.error, ...r);
|
|
172
|
+
y.info = (...r) => tt(console.info, ...r);
|
|
173
173
|
const Xt = (r) => {
|
|
174
174
|
let t = {}, e, s;
|
|
175
175
|
if (typeof r != "object" || r === null)
|
|
@@ -202,7 +202,7 @@ let de = class {
|
|
|
202
202
|
if (t) {
|
|
203
203
|
let e;
|
|
204
204
|
const s = setTimeout(() => {
|
|
205
|
-
process.env.NODE_ENV !== "production" &&
|
|
205
|
+
process.env.NODE_ENV !== "production" && y.warn(
|
|
206
206
|
`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,
|
|
207
207
|
t
|
|
208
208
|
), e = setTimeout(() => {
|
|
@@ -457,7 +457,7 @@ let Rt = class {
|
|
|
457
457
|
}
|
|
458
458
|
mount(t, e) {
|
|
459
459
|
let s = t.get("mounted-nodes");
|
|
460
|
-
return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" &&
|
|
460
|
+
return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && y.error(
|
|
461
461
|
"Trying to mount an already mounted component node.",
|
|
462
462
|
this
|
|
463
463
|
), () => {
|
|
@@ -634,12 +634,12 @@ const ve = (r) => {
|
|
|
634
634
|
));
|
|
635
635
|
const Mt = [], Dt = [], jt = [];
|
|
636
636
|
if (h.changesets.forEach((v) => {
|
|
637
|
-
const [
|
|
638
|
-
we(nt.breakpoints, r.breakpoints) && (D && (typeof
|
|
639
|
-
|
|
640
|
-
) : b(h.attributes.properties,
|
|
641
|
-
|
|
642
|
-
) : b(h.attributes.context,
|
|
637
|
+
const [$, nt] = v;
|
|
638
|
+
we(nt.breakpoints, r.breakpoints) && (D && (typeof $.properties == "function" ? Mt.push(
|
|
639
|
+
$.properties
|
|
640
|
+
) : b(h.attributes.properties, $.properties)), it && (typeof $.layout == "function" ? Dt.push($.layout) : b(h.attributes.layout, $.layout)), g && (typeof $.context == "function" ? jt.push(
|
|
641
|
+
$.context
|
|
642
|
+
) : b(h.attributes.context, $.context)));
|
|
643
643
|
}), Mt.forEach((v) => {
|
|
644
644
|
b(
|
|
645
645
|
h.attributes.properties,
|
|
@@ -650,11 +650,11 @@ const ve = (r) => {
|
|
|
650
650
|
}), jt.forEach((v) => {
|
|
651
651
|
b(h.attributes.context, v(h.attributes.context));
|
|
652
652
|
}), g || p.recursive) {
|
|
653
|
-
const v = r.getBranch(h),
|
|
653
|
+
const v = r.getBranch(h), $ = p.recursive ? p : {
|
|
654
654
|
context: !!g
|
|
655
655
|
};
|
|
656
656
|
h.getChildren(v).forEach((nt) => {
|
|
657
|
-
l(nt,
|
|
657
|
+
l(nt, $);
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
660
|
};
|
|
@@ -885,14 +885,14 @@ const bs = (r, t) => ({
|
|
|
885
885
|
);
|
|
886
886
|
});
|
|
887
887
|
var w = /* @__PURE__ */ ((r) => (r.Cookie = "cookie", r.Local = "local", r.Session = "session", r))(w || {}), At = /* @__PURE__ */ ((r) => (r.Tenant = "tenant", r.Implementation = "implementation", r.Widget = "widget", r))(At || {}), f = /* @__PURE__ */ ((r) => (r.Necessary = "necessary", r.Functional = "functional", r.Analytical = "analytical", r.Marketing = "marketing", r))(f || {});
|
|
888
|
-
const Ee = (r, t, e, s = {}) => Lt(r, e).then((i) => (process.env.NODE_ENV !== "production" && i &&
|
|
888
|
+
const Ee = (r, t, e, s = {}) => Lt(r, e).then((i) => (process.env.NODE_ENV !== "production" && i && y.warn(
|
|
889
889
|
`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
890
890
|
Key: ${t}
|
|
891
891
|
Category: ${JSON.stringify(e)}
|
|
892
892
|
Options: ${JSON.stringify(s)}`
|
|
893
893
|
), (n) => (Et(r), Lt(r, e).then((o) => {
|
|
894
894
|
if (o) {
|
|
895
|
-
process.env.NODE_ENV !== "production" &&
|
|
895
|
+
process.env.NODE_ENV !== "production" && y.warn(
|
|
896
896
|
`storageWriter: Attempted to write to storage using unallowed category.
|
|
897
897
|
Key: ${t}
|
|
898
898
|
Category: ${JSON.stringify(e)}
|
|
@@ -907,7 +907,11 @@ const Ee = (r, t, e, s = {}) => Lt(r, e).then((i) => (process.env.NODE_ENV !== "
|
|
|
907
907
|
duration: l
|
|
908
908
|
} = s, h = Oe();
|
|
909
909
|
return h[a][t] = re(n, e, l), c === w.Cookie ? Ue(r, h) : De(r, c, h);
|
|
910
|
-
})))), Se = (r, t, e = w.Session) => (Et(r),
|
|
910
|
+
})))), Se = (r, t, e = w.Session) => (Et(r), typeof t > "u" ? (process.env.NODE_ENV !== "production" && y.warn(
|
|
911
|
+
"readStorage: Undefined key passed when reading storage. ",
|
|
912
|
+
t,
|
|
913
|
+
e
|
|
914
|
+
), Promise.resolve(void 0)) : e === w.Cookie ? Te(r).then((s) => yt(s, t)) : Me(r, e).then(
|
|
911
915
|
(s) => yt(s, t)
|
|
912
916
|
)), U = (r) => !!Object.entries(r).filter(([t, e]) => typeof e < "u").length, ht = (r) => Object.entries(r).filter(([t, e]) => typeof e < "u").forEach(([t, { value: e }]) => {
|
|
913
917
|
typeof e > "u" && delete r[t];
|
|
@@ -1032,7 +1036,7 @@ $t((r) => {
|
|
|
1032
1036
|
const { consent: s } = e;
|
|
1033
1037
|
if (typeof s < "u") {
|
|
1034
1038
|
if (typeof s != "number" && typeof s != "string" && !Array.isArray(s)) {
|
|
1035
|
-
process.env.NODE_ENV !== "production" &&
|
|
1039
|
+
process.env.NODE_ENV !== "production" && y.warn(
|
|
1036
1040
|
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1037
1041
|
Passed consent: ${JSON.stringify(s)}`
|
|
1038
1042
|
);
|
|
@@ -1041,7 +1045,7 @@ $t((r) => {
|
|
|
1041
1045
|
if (Array.isArray(s) && !s.every(
|
|
1042
1046
|
(n) => typeof n == "number" || typeof n == "string"
|
|
1043
1047
|
)) {
|
|
1044
|
-
process.env.NODE_ENV !== "production" &&
|
|
1048
|
+
process.env.NODE_ENV !== "production" && y.warn(
|
|
1045
1049
|
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1046
1050
|
Passed consent: ${JSON.stringify(s)}`
|
|
1047
1051
|
);
|
|
@@ -1053,7 +1057,7 @@ $t((r) => {
|
|
|
1053
1057
|
f.Analytical,
|
|
1054
1058
|
f.Marketing
|
|
1055
1059
|
].filter((n, o, a) => typeof s == "number" ? s > o : typeof s == "string" ? a.indexOf(s) + 1 > o : Array.isArray(s) ? s.findIndex((c) => c === o + 1 || c === n) > -1 : !0);
|
|
1056
|
-
return i.indexOf(f.Necessary) === -1 && (process.env.NODE_ENV !== "production" &&
|
|
1060
|
+
return i.indexOf(f.Necessary) === -1 && (process.env.NODE_ENV !== "production" && y.warn(
|
|
1057
1061
|
`storagePolicyConfigurationApi: passed consent does not include category: '${f.Necessary}'. Consent has to atleast include the '${f.Necessary}' category.
|
|
1058
1062
|
Passed consent: ${JSON.stringify(s)}`
|
|
1059
1063
|
), i.unshift(f.Necessary)), Ee(
|
|
@@ -1267,7 +1271,9 @@ let T = class extends HTMLElement {
|
|
|
1267
1271
|
const s = this.constructor, i = s._$Eh.get(t);
|
|
1268
1272
|
if (i !== void 0 && this._$Em !== i) {
|
|
1269
1273
|
const a = s.getPropertyOptions(i), c = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? a.converter : X;
|
|
1270
|
-
this._$Em = i
|
|
1274
|
+
this._$Em = i;
|
|
1275
|
+
const l = c.fromAttribute(e, a.type);
|
|
1276
|
+
this[i] = l ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? l, this._$Em = null;
|
|
1271
1277
|
}
|
|
1272
1278
|
}
|
|
1273
1279
|
requestUpdate(t, e, s) {
|
|
@@ -1350,7 +1356,7 @@ let T = class extends HTMLElement {
|
|
|
1350
1356
|
firstUpdated(t) {
|
|
1351
1357
|
}
|
|
1352
1358
|
};
|
|
1353
|
-
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[H("elementProperties")] = /* @__PURE__ */ new Map(), T[H("finalized")] = /* @__PURE__ */ new Map(), dt == null || dt({ ReactiveElement: T }), (x.reactiveElementVersions ?? (x.reactiveElementVersions = [])).push("2.1.
|
|
1359
|
+
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[H("elementProperties")] = /* @__PURE__ */ new Map(), T[H("finalized")] = /* @__PURE__ */ new Map(), dt == null || dt({ ReactiveElement: T }), (x.reactiveElementVersions ?? (x.reactiveElementVersions = [])).push("2.1.1");
|
|
1354
1360
|
/**
|
|
1355
1361
|
* @license
|
|
1356
1362
|
* Copyright 2017 Google LLC
|
|
@@ -1500,7 +1506,7 @@ class V {
|
|
|
1500
1506
|
}
|
|
1501
1507
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
1502
1508
|
var s;
|
|
1503
|
-
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t
|
|
1509
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t !== this._$AB; ) {
|
|
1504
1510
|
const i = t.nextSibling;
|
|
1505
1511
|
t.remove(), t = i;
|
|
1506
1512
|
}
|
|
@@ -1577,7 +1583,7 @@ class ts {
|
|
|
1577
1583
|
}
|
|
1578
1584
|
}
|
|
1579
1585
|
const mt = R.litHtmlPolyfillSupport;
|
|
1580
|
-
mt == null || mt(W, V), (R.litHtmlVersions ?? (R.litHtmlVersions = [])).push("3.3.
|
|
1586
|
+
mt == null || mt(W, V), (R.litHtmlVersions ?? (R.litHtmlVersions = [])).push("3.3.1");
|
|
1581
1587
|
const es = (r, t, e) => {
|
|
1582
1588
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
1583
1589
|
let i = s._$litPart$;
|
|
@@ -1622,7 +1628,7 @@ var Qt;
|
|
|
1622
1628
|
L._$litElement$ = !0, L.finalized = !0, (Qt = O.litElementHydrateSupport) == null || Qt.call(O, { LitElement: L });
|
|
1623
1629
|
const gt = O.litElementPolyfillSupport;
|
|
1624
1630
|
gt == null || gt({ LitElement: L });
|
|
1625
|
-
(O.litElementVersions ?? (O.litElementVersions = [])).push("4.2.
|
|
1631
|
+
(O.litElementVersions ?? (O.litElementVersions = [])).push("4.2.1");
|
|
1626
1632
|
/**
|
|
1627
1633
|
* @license
|
|
1628
1634
|
* Copyright 2017 Google LLC
|
|
@@ -1921,7 +1927,7 @@ const ls = async (r, t) => {
|
|
|
1921
1927
|
}), t, i))), xs = (r) => ds(
|
|
1922
1928
|
r,
|
|
1923
1929
|
"list",
|
|
1924
|
-
import("./list-
|
|
1930
|
+
import("./list-Dji0SB0H.mjs"),
|
|
1925
1931
|
(t) => {
|
|
1926
1932
|
(async () => {
|
|
1927
1933
|
t.writeProperties({ loading: !0, items: [], totalItems: 0 });
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index-
|
|
1
|
+
"use strict";const e=require("./index-CsqCL9RN.js");module.exports=e.ListComponent;
|
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CsqCL9RN.js");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as g, N as k, a as E, i as C, d as y, n as _, r as u, x, E as $, b as q } from "./index-
|
|
1
|
+
import { e as g, N as k, a as E, i as C, d as y, n as _, r as u, x, E as $, b as q } from "./index-DvwofZDZ.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-list-flamingo",
|
|
3
|
-
"version": "1.1.120
|
|
3
|
+
"version": "1.1.120",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@telia-ace/widget-runtime-flamingo": "1.1.120
|
|
5
|
+
"@telia-ace/widget-runtime-flamingo": "1.1.120",
|
|
6
6
|
"@webprovisions/platform": "^1.1.3",
|
|
7
7
|
"lit": "^3.0.2"
|
|
8
8
|
},
|