@luzmo/analytics-components-kit 1.0.9-beta.3 → 1.0.9-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/react/package.json +2 -2
- package/standalone/chunks/base-Cgmw1Vq_.js +2 -0
- package/standalone/chunks/display-settings-binning-CxpvhW7Y.js +38 -0
- package/standalone/chunks/display-settings-datetime-Cqptoxuq.js +199 -0
- package/standalone/chunks/display-settings-grand-totals-BJp7zJPj.js +26 -0
- package/standalone/chunks/display-settings-numeric-BskLgQmz.js +172 -0
- package/standalone/chunks/{display-settings-period-over-period-Bwjoji3a.js → display-settings-period-over-period-CbUd7uc9.js} +1 -1
- package/standalone/chunks/embed-EnSdYTW8.js +228 -0
- package/standalone/chunks/{filters-C1yU7w2V.js → filters-CTsIpQ2T.js} +68 -68
- package/standalone/chunks/{formula-codemirror-BAlhe79s.js → formula-codemirror-4wlUAHrO.js} +1 -1
- package/standalone/chunks/item-option-action-button-group-DZW0HRGd.js +35 -0
- package/standalone/chunks/item-option-base-BlSnktzl.js +38 -0
- package/standalone/chunks/item-option-color-palette-picker-jnEt02PP.js +22 -0
- package/standalone/chunks/{item-option-color-picker-59il-pkm.js → item-option-color-picker-CcElYCgD.js} +1 -1
- package/standalone/chunks/item-option-color-range-DTFbs7JK.js +80 -0
- package/standalone/chunks/item-option-guidelines-DFlj41ZE.js +117 -0
- package/standalone/chunks/{item-option-multi-language-field-BNn4WFUG.js → item-option-multi-language-field-DVc8-FVc.js} +1 -1
- package/standalone/chunks/{item-option-number-field-_lCPA_qC.js → item-option-number-field-B1V-8Nq-.js} +1 -1
- package/standalone/chunks/item-option-panel-CpyguQjh.js +298 -0
- package/standalone/chunks/{item-option-picker-CeK7QDTm.js → item-option-picker-BCrQSP1O.js} +1 -1
- package/standalone/chunks/item-option-position-picker-CLiGzaZ1.js +14 -0
- package/standalone/chunks/item-option-positions-number-field-DmFdahh8.js +31 -0
- package/standalone/chunks/{item-option-radio-button-group-DR7gdaTr.js → item-option-radio-button-group-nioc7wyo.js} +1 -1
- package/standalone/chunks/item-option-slider-BfXB8U09.js +15 -0
- package/standalone/chunks/{item-option-switch-DJfnhpf_.js → item-option-switch-DPF9lIX0.js} +1 -1
- package/standalone/chunks/{item-option-text-field-DNqL7Evw.js → item-option-text-field-CRbhs_g4.js} +1 -1
- package/standalone/chunks/item-slot-picker-panel-B_7VXYPs.js +439 -0
- package/standalone/chunks/load-data-fields-for-datasets-fBp1YEFi.js +25 -0
- package/standalone/chunks/{load-formula-codemirror-Cyqo4LoE.js → load-formula-codemirror-DcjxFIW6.js} +1 -1
- package/standalone/chunks/localized-mixin-YSDMfLKU.js +2 -0
- package/standalone/chunks/{luzmo-icon-markup-GqF25og5.js → luzmo-icon-markup-JO3eup7O.js} +1 -1
- package/standalone/chunks/luzmoCog-C4v4vc5N.js +2 -0
- package/standalone/chunks/luzmoLockOutline-Dctb86HR.js +2 -0
- package/standalone/chunks/luzmoTable-BYeZ8pW6.js +2 -0
- package/standalone/chunks/task-CTUsEtxU.js +2 -0
- package/standalone/chunks/themes-BD5sKr3j.js +2 -0
- package/standalone/chunks/v4-CI0qP0ur.js +2 -0
- package/standalone/interactive-viz-item.js +20 -246
- package/standalone/item-grid.js +115 -0
- package/standalone/manifest.json +40 -33
- package/standalone/chunks/base-DOKoeL4P.js +0 -2
- package/standalone/chunks/display-settings-binning-CTWsdo0F.js +0 -38
- package/standalone/chunks/display-settings-datetime-CdxMI-9Q.js +0 -199
- package/standalone/chunks/display-settings-grand-totals-BCW8hefp.js +0 -26
- package/standalone/chunks/display-settings-numeric-D04OO7n9.js +0 -172
- package/standalone/chunks/item-option-action-button-group-B3cugMc_.js +0 -35
- package/standalone/chunks/item-option-base-R8-N5_rE.js +0 -38
- package/standalone/chunks/item-option-color-palette-picker-CMZyo1NH.js +0 -22
- package/standalone/chunks/item-option-color-range-BWaElfwS.js +0 -80
- package/standalone/chunks/item-option-guidelines-BzvrNruz.js +0 -117
- package/standalone/chunks/item-option-panel-CyE_83Hf.js +0 -298
- package/standalone/chunks/item-option-position-picker-BAWZpDBA.js +0 -14
- package/standalone/chunks/item-option-positions-number-field-DjhFmMAp.js +0 -31
- package/standalone/chunks/item-option-slider-C_jierlR.js +0 -15
- package/standalone/chunks/item-slot-picker-panel-Bqmx51Yb.js +0 -439
- package/standalone/chunks/load-data-fields-for-datasets-_VJWUFPO.js +0 -25
- package/standalone/chunks/localized-mixin-BEfBwOPN.js +0 -2
- package/standalone/chunks/task-C3c3OWyi.js +0 -2
|
@@ -19,250 +19,24 @@
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import{n as e,t}from"./chunks/localized-mixin-BEfBwOPN.js";import{n}from"./chunks/lit-localize-CIGP-NUw.js";import{t as r}from"./chunks/luzmoAlignLeft-HA-XKPHy.js";import{n as i,r as a,t as o}from"./chunks/base-DOKoeL4P.js";import{t as s}from"./chunks/create-lazy-loader-DC0rJePE.js";import{LitElement as c,css as l,html as u,nothing as d,property as f,query as p,state as m,styleMap as h,unsafeCSS as g}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.3.0-beta.0/standalone/tabs.js";var _=(e,t)=>{let n=`The dashboard component encountered an error`;typeof t?.dashboardId==`string`&&(n+=` for dashboard with id ${t.dashboardId}`),typeof t?.dashboardSlug==`string`&&(n+=` for dashboard with slug ${t.dashboardSlug}`),typeof t?.container==`string`&&(n+=` in container ${t.container}`),e&&(n+=`:
|
|
23
|
-
${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.documentElement).style,i={svg:!!(`createElementNS`in document&&document.createElementNS(`http://www.w3.org/2000/svg`,`svg`).createSVGRect),flexbox:r.webkitFlexWrap===``||r.flexWrap===``,postMessage:!!window.postMessage};for(let r of[`svg`,`flexbox`,`postMessage`])i[r]||(t=!0,e.browserNotSupported=e.browserNotSupported||[],e.browserNotSupported.push(r),n+=`Your browser does not support: ${r}
|
|
24
|
-
`);let a=window.navigator.userAgent,o=a.includes(`MSIE`),s=a.includes(`Trident/`);(o||s)&&(t=!0,n=`IE is not supported.`),t&&_(n)},v={appServer:`https://app.luzmo.com/`,apiHost:`https://api.luzmo.com/`,dashboardId:null,dashboardSlug:null,container:null,key:null,token:null,language:`auto`,editorLanguage:`auto`,editMode:null,screenMode:null,switchScreenModeOnResize:!0,itemId:null,theme:``,mainColor:``,itemDimensions:{width:`auto`,height:`auto`},loaderBackground:`#f9f9f9`,loaderFontColor:`#5a5a5a`,loaderSpinnerColor:`rgb(68, 52, 255)`,loaderSpinnerBackground:`rgba(169, 169, 169, 0.14)`,timezoneId:null,contextId:null},te=[{mode:`mobile`,width:[150,767]},{mode:`tablet`,width:[768,1199]},{mode:`desktop`,width:[1200,1599]},{mode:`largeScreen`,width:[1600,9999]},{mode:`fixed`,width:[]}],ne={initializing:{en:`Initializing...`,nl:`Laden...`,fr:`Chargement...`,de:`Initialisiere...`,es:`Inicializando...`},errorDashboard:{en:`Oops, we could not load this dashboard!`,nl:`Oeps, we konden het dashboard niet laden.`,fr:`Le chargement a echoué.`,de:`Hoppla, wir konnten dieses Dashboard nicht laden!`,es:`¡Ups! No pudimos cargar este tablero.`},errorItem:{en:`Oops, we could not load this item!`,nl:`Oeps, we konden de grafiek niet laden.`,fr:`Le chargement a echoué.`,de:`Hoppla, wir konnten dieses Diagramm nicht laden!`,es:`¡Ups! No pudimos cargar este elemento.`}},re=e=>e?e.endsWith(`/`)?e:`${e}/`:``,y=e=>e?e.endsWith(`/`)?e.slice(0,-1):e:``,ie=(e,t,n,r)=>{let i=(e,t)=>{let n=e.users.find(e=>e.id===t.id),r=n&&n.userAccessRight?{flagRead:n.userAccessRight.flagRead,flagUse:n.userAccessRight.flagUse,flagModify:n.userAccessRight.flagModify,flagOwn:n.userAccessRight.flagOwn}:{flagRead:!1,flagUse:!1,flagModify:!1,flagOwn:!1},i=e.groups.filter(e=>t.userGroups.includes(e.id)||e.public===!0).map(e=>{if(e.groupAccessRight)return e.groupAccessRight});for(let e of i)!r.flagRead&&e.flagRead&&(r.flagRead=e.flagRead),!r.flagUse&&e.flagUse&&(r.flagUse=e.flagUse),!r.flagModify&&e.flagModify&&(r.flagModify=e.flagModify),!r.flagOwn&&e.flagOwn&&(r.flagOwn=e.flagOwn);let a=e.integrations?.length>0?e.integrations.map(e=>{if(e.integrationAccessRight)return e.integrationAccessRight}):[];for(let e of a)!r.flagRead&&e.flagRead&&(r.flagRead=e.flagRead),!r.flagUse&&e.flagUse&&(r.flagUse=e.flagUse),!r.flagModify&&e.flagModify&&(r.flagModify=e.flagModify);return r},a=(e,t)=>{if(e==null)return``;if(typeof e!=`object`||Object.keys(e).length===0)return typeof e==`object`&&Object.keys(e).length===0?``:e;let n;return n=t&&e[t]?e[t]:e[Object.keys(e)[0]],n??=``,n},o=[];for(let s of e){let e={accessibleBy:[],accessRights:i(s,n),id:s.id,modifiedAt:s.modified_at,name:a(s.name,r.language),slug:null,tags:s.tags.map(e=>e.tag).sort((e,t)=>e.localeCompare(t))},c=s.integrations.find(e=>e.id===t);c?.integrationAccessRight?.slug&&(e.slug=c.integrationAccessRight.slug);let l=s.users.map(e=>({model:`User`,id:e.id,name:a(e.name,n.locale_id)})),u=s.groups.map(e=>({model:`Group`,id:e.id,name:a(e.name,n.locale_id)||{}})),d=s.integrations.map(e=>({model:`Integration`,id:e.id,name:a(e.name,n.locale_id)||{}}));e.accessibleBy=[...l,...u,...d],o.push(e)}return o},ae=e=>{let t=/^(%20|\s)*(javascript|data)/im,n=/[^\u0020-\u007E]/gim,r=/^([^:]+):/gm,i=new Set([`.`,`/`]),a=e=>i.has(e[0]);if(!e)return`about:blank`;let o=e.replaceAll(n,``).trim();if(a(o))return o;let s=o.match(r);if(!s)return o;let c=s[0];return t.test(c)?`about:blank`:o},oe=e=>JSON.parse(JSON.stringify(e)),se=e=>e&&typeof e==`object`,ce=(e,t)=>(Object.entries(t).forEach(([t,n])=>{t in e?e[t]===void 0?e[t]=n:e[t]=se(n)?ce(e[t],n):e[t]:e[t]=n}),e),b=()=>`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replaceAll(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==`x`?t:t&3|8).toString(16)}),le=e=>{let t=[],{appServer:n,language:r,editorLanguage:i,loaderBackground:a,loaderSpinnerColor:o,loaderSpinnerBackground:s,loaderFontColor:c,screenMode:l,key:u,token:d,timezoneId:f,itemEmbedding:p,itemDimensions:m,dashboardId:h,dashboardSlug:g,itemId:_,theme:ee,mainColor:v,editMode:te}=e.params;r&&r!==`auto`&&t.push(`language=${r}`),i&&i!==`auto`&&t.push(`editorLanguage=${i}`),a&&t.push(`ldrbg=${a}`),c&&t.push(`ldrftclr=${c}`),o&&t.push(`ldrspclr=${o}`),s&&t.push(`ldrspbg=${s}`),ee&&t.push(`theme=${ee}`),v&&t.push(`mainColor=${v}`),l&&l!==`auto`&&t.push(`screenMode=${l}`),f&&t.push(`timezoneId=`+f),p&&m&&m.width&&t.push(`width=`+m.width),p&&m&&m.height&&t.push(`height=`+m.height),te&&t.push(`editMode=`+te);let ne=u&&d?`#`+u+`:`+d:``;t.push(`version=`+(e.libVersion||`0.0.0-unknown-luzmo`));let y=re(n);return ae(p?`${y}i/${h||g}/${_}?${encodeURIComponent(t.join(`&`))}${ne}`:`${y}i/${h||g}?${encodeURIComponent(t.join(`&`))}${ne}`)},ue=e=>{let t;(e.params.error||e.browserNotSupported.length>0)&&(e.params.error=!0,e.browserNotSupported&&(t=`Browser is not supported.`));let n=ne.initializing[e.params.language]||ne.initializing.en;return e.browserNotSupported||e.params.error?{loadingMsg:n,errorMsg:t}:{loadingMsg:n,errorMsg:``}};function x(e,t,n){e.promises[t]&&(e.promises[t].resolve(n),delete e.promises[t])}function de(e,t,n){e.promises[t]&&(e.promises[t].reject(n),delete e.promises[t])}function fe(e){let t={};return e.params.loaderBackground&&!e.iframeLoaded&&(t.background=e.params.loaderBackground),t}function pe(e){let t=e.params.itemDimensions?.height||v.itemDimensions.height,n=e.params.itemEmbedding&&t!==`auto`;return{display:e.iframeLoaded?`none`:``,height:`${n?t:e.minHeight}px`}}function me(e){let t=e.params.loaderBackground||v.loaderBackground;if(e.params.itemEmbedding){e.loaderSize=24,e.borderWidth=4,e.minHeight=200;let n=e.params.itemDimensions?.width||v.itemDimensions.width,r=e.params.itemDimensions?.height||v.itemDimensions.height,i=n!==`auto`,a=r!==`auto`;return{background:t,width:i?`${n}px`:`100%`,height:`${a?r:`200`}px`,"min-height":a?``:`200px`}}return{background:t}}function he(e){let{loaderSpinnerColor:t,loaderSpinnerBackground:n}=v,r=ve(e.borderWidth,e.params.loaderSpinnerColor||t),i=ve(e.borderWidth,e.params.loaderSpinnerBackground||n),a=`${e.loaderSize}px`;return{"border-top":r,"border-right":r,"border-bottom":i,"border-left":i,width:a,height:a}}function ge(e){let t=e.params.itemDimensions?.height||v.itemDimensions.height,n=e.params.itemEmbedding&&t!==`auto`;return{padding:`${e.params.itemId?(t=>`${(t-e.loaderSize-32)/2}px`)(n?Number.parseInt(`${t}`,10):e.minHeight):`128px`} 16px`}}function _e(e){let t=e.params.itemDimensions?.height||v.itemDimensions.height,n=e.params.itemDimensions?.width||v.itemDimensions.width;e.params.itemEmbedding&&t!==`auto`?e.iframeHeight=`${t}px`:e.params.itemEmbedding?e.iframeHeight=`200px`:[`editFull`,`editLimited`].includes(e.params.editMode)?e.iframeHeight=`100%`:e.iframeHeight=`400px`,e.iframeWidth=e.params.itemEmbedding&&n!==`auto`?`${n}px`:`100%`;let r={height:e.iframeHeight,width:e.iframeWidth};return e.iframeLoaded?r.opacity=1:e.error?(r.opacity=1,r.width=`100%`,r.height=`400px`):r.opacity=0,r}function ve(e,t){return`${e}px solid ${t}`}var ye=(e,t)=>{e?.contentWindow&&e.contentWindow.location.replace(t)},be=(e,t,n)=>{let r=b();return t?.contentWindow?(t.contentWindow.postMessage({action:`exportDashboard`,format:n||`png`,_version:e.libVersion,requestId:r},`*`),new Promise((t,n)=>{e.promises[r]={resolve:t,reject:n},setTimeout(()=>{e.promises[r]&&(e.promises[r].reject(Error(`exportDashboard request timed out.`)),delete e.promises[r])},12e5)})):Promise.reject(Error(`Cannot retrieve contentWindow.`))},xe=async e=>{if(await e.updateComplete,(e.currentAuthKey??e.authKey)&&(e.currentAuthToken??e.authToken)){let t=new Promise((t,n)=>{(()=>{try{window.fetch(`${re(e.params.apiHost)}0.1.0/authorization`,{method:`POST`,mode:`cors`,cache:`no-cache`,headers:{"Content-Type":`application/json`},redirect:`follow`,body:JSON.stringify({action:`get`,version:`0.1.0`,key:e.currentAuthKey??e.authKey,token:e.currentAuthToken??e.authToken,find:{where:{id:e.authKey},attributes:[`id`,`integration_id`],include:[{model:`User`,attributes:[`id`,`name`,`locale_id`],include:[{model:`Group`}]}]}})}).then(e=>e.json()).then(e=>{!e||!e.rows||e.rows.length===0||!e.rows[0].user?n(`Authorization failed, please check authKey and authToken. If the problem persists, please contact support@luzmo.com.`):(e.rows[0].user.userGroups=e.rows[0].user.groups.map(e=>e.id),delete e.rows[0].user.groups,t({integrationId:e.rows[0].integration_id,user:e.rows[0].user}))})}catch(e){n(e)}})()});return new Promise((n,r)=>void(()=>{try{t.then(t=>{window.fetch(`${re(e.params.apiHost)}0.1.0/securable`,{method:`POST`,mode:`cors`,cache:`no-cache`,headers:{"Content-Type":`application/json`},redirect:`follow`,body:JSON.stringify({action:`get`,version:`0.1.0`,key:e.currentAuthKey??e.authKey,token:e.currentAuthToken??e.authToken,find:{where:{type:`dashboard`,is_variant:!1},attributes:[`id`,`name`,`modified_at`],order:[[`modified_at`,`desc`]],include:[{model:`Tag`,attributes:[`tag`]},{model:`User`,attributes:[`id`,`name`]},{model:`Group`,attributes:[`id`,`name`,`public`]},{model:`Integration`,attributes:[`id`,`name`]}]}})}).then(e=>e.json()).then(r=>{n(r.rows.length>0?ie(r.rows,t.integrationId,t.user,e):[])})}).catch(e=>{r(e)})}catch(e){r(e)}})())}throw Error(`No authKey or authToken found in the luzmo-dashboard component.`)},Se=(e,t)=>{if(t?.contentWindow){let n=b();return t.contentWindow.postMessage({action:`getDashboardContext`,_version:e.libVersion,requestId:n},`*`),new Promise((t,r)=>{e.promises[n]={resolve:t,reject:r},setTimeout(()=>{e.promises[n]&&(e.promises[n].reject(Error(`getDashboardContext request timed out.`)),delete e.promises[n])},2e3)})}return Promise.reject(Error(`Cannot retrieve contentWindow.`))},Ce=(e,t,n)=>{if(t?.contentWindow){let r=b();return t.contentWindow.postMessage({action:`getData`,id:n,_version:e.libVersion,requestId:r},`*`),new Promise((t,n)=>{e.promises[r]={resolve:t,reject:n},setTimeout(()=>{e.promises[r]&&(e.promises[r].reject(Error(`getData request timed out.`)),delete e.promises[r])},2e3)})}return Promise.reject(Error(`Cannot retrieve contentWindow.`))},we=(e,t)=>{if(t?.contentWindow){let n=b();return t.contentWindow.postMessage({action:`getFilters`,_version:e.libVersion,requestId:n},`*`),new Promise((t,r)=>{e.promises[n]={resolve:t,reject:r},setTimeout(()=>{e.promises[n]&&(e.promises[n].reject(Error(`getFilters request timed out.`)),delete e.promises[n])},2e3)})}return Promise.reject(Error(`Cannot retrieve contentWindow.`))},Te=(e,t,n={})=>{if(!t?.contentWindow)return Promise.reject(Error(`Cannot retrieve contentWindow.`));let r=b();return t.contentWindow.postMessage({action:`getInsights`,options:n,_version:e.libVersion,requestId:r},`*`),new Promise((t,n)=>{e.promises[r]={resolve:t,reject:n},setTimeout(()=>{e.promises[r]&&(e.promises[r].reject(Error(`getInsights request timed out.`)),delete e.promises[r])},6e4)})},Ee=(e,t,n)=>t?(t.contentWindow.postMessage({action:`refreshData`,id:n??null,_version:e.libVersion},`*`),Promise.resolve()):Promise.reject(Error(`Cannot retrieve contentWindow.`)),De=(e,t)=>t?(t.contentWindow.postMessage({action:`reloadDashboard`,_version:e.libVersion},`*`),Promise.resolve()):Promise.reject(Error(`Cannot retrieve contentWindow.`)),Oe=(e,t,n,r,i)=>t?(t.contentWindow.postMessage({action:`sendExportEmail`,type:n||`once`,subject:r,message:i,_version:e.libVersion},`*`),Promise.resolve()):Promise.reject(Error(`Cannot retrieve contentWindow.`)),ke=(e,t,n,r)=>t?(t.contentWindow.postMessage({action:`setAuthorization`,key:n,token:r,_version:e.libVersion},`*`),Promise.resolve()):Promise.reject(Error(`Cannot retrieve contentWindow.`)),Ae=(e,t,n)=>{if(t&&t.contentWindow){let r=b();return e.params.editMode===n?Promise.reject(Error(`editMode parameter is currently already set to `+n)):n!==`editFull`&&n!==`editLimited`&&n!==`view`?Promise.reject(Error(`The editMode parameter must be one of the following values: 'editFull', 'editLimited' or 'view'.`)):(t.contentWindow.postMessage({action:`setEditMode`,editMode:n,_version:e.libVersion,requestId:r},`*`),new Promise((t,n)=>{e.promises[r]={resolve:t,reject:n}}))}return Promise.reject(Error(`Cannot retrieve contentWindow.`))},je=(e,t,n)=>{if(t){let r=b();return t.contentWindow.postMessage({action:`setPreview`,preview:n,requestId:r,_version:e.libVersion},`*`),new Promise((t,n)=>{e.promises[r]={resolve:t,reject:n},setTimeout(()=>{e.promises[r]&&(e.promises[r].reject(Error(`setPreview request timed out.`)),delete e.promises[r])},2e3)})}return Promise.reject(Error(`Cannot retrieve contentWindow.`))},Me=(e,t,n,r)=>{if(t){let i=b();return t.contentWindow.postMessage({action:`setSelectedData`,itemId:n,filters:r,_version:e.libVersion,requestId:i},`*`),new Promise((t,n)=>{e.promises[i]={resolve:t,reject:n},setTimeout(()=>{e.promises[i]&&(e.promises[i].reject(Error(`setSelectedData request timed out.`)),delete e.promises[i])},2e3)})}return Promise.reject()},Ne=e=>{if(!e.dimensions){e.params.error=!0,_(`Got no valid dimensions.`,e.params);return}let t=Object.keys(e.dimensions),n=[],r,i=0,a=0;if(!e.params.switchScreenModeOnResize&&e.currentScreenMode&&(e.params.screenMode=e.currentScreenMode),e.dimensions&&t?.[0]===`fixed`)r=`fixed`,i=e.dimensions.fixed[0],a=e.dimensions.fixed[1];else{let o=[`mobile`,`tablet`,`desktop`,`largeScreen`];if(e.params.itemEmbedding){let[n]=t,r=oe(n);for(let n of o){let i=t.find(e=>e===n);i?r=oe(i):e.dimensions[n]=e.dimensions[r]}}for(let r of t)if(o.includes(r)){let t=te.find(e=>e.mode===r);n.push({...t,height:e.dimensions[r][1]||50})}if(n.map(e=>e.mode).includes(e.params.screenMode)||(e.params.screenMode=`auto`),e.params.screenMode===`auto`){n.sort((e,t)=>o.indexOf(e.mode)-o.indexOf(t.mode));for(let t of n){let[n,o]=t.width;e.params.itemEmbedding&&e.params.itemDimensions&&e.params.itemDimensions.width!==`auto`&&e.params.itemDimensions.height===`auto`?n<e.params.itemDimensions.width&&(r=t.mode,i=Number.parseInt(e.params.itemDimensions.width,10),a=e.dimensions[r][1]):n<e.containerWidth&&(r=t.mode,e.params.itemEmbedding?(i=e.params.itemDimensions?.width&&e.params.itemDimensions?.width!==`auto`?Number.parseInt(e.params.itemDimensions.width,10):Math.min(e.containerWidth,o),a=e.params.itemDimensions?.height&&e.params.itemDimensions?.height!==`auto`?Number.parseInt(e.params.itemDimensions.height,10):e.dimensions[r][1],e.params.itemDimensions&&e.params.itemDimensions.width!==`auto`&&e.params.itemDimensions.height===`auto`&&(i=Number.parseInt(e.params.itemDimensions.width,10),a=e.dimensions[r][1])):(i=Math.max(Math.min(o,e.containerWidth),n),a=t.height))}}else{let{height:t,width:[o,s]}=n.find(t=>t.mode===e.params.screenMode);r=e.params.screenMode,i=Math.max(Math.min(s,e.containerWidth),o),a=t,e.params.itemEmbedding&&(e.params.itemDimensions?.width&&e.params.itemDimensions?.width!==`auto`&&(i=Number.parseInt(e.params.itemDimensions.width,10)),e.params.itemDimensions?.height&&e.params.itemDimensions?.height!==`auto`&&(a=Number.parseInt(e.params.itemDimensions.height,10)))}if(!r&&n.length>0){let[e]=n;r=e.mode,i=e.width[0],a=e.height}}e.currentScreenMode=r;let o={height:a===0?`100%`:`${String(a)}px`,width:i===0?`100%`:`${String(i)}px`,opacity:1};[`editFull`,`editLimited`].includes(e.params.editMode)?(o.height=`100%`,o.width=`100%`):e.params.itemEmbedding&&e.params.itemDimensions?(o.height=e.params.itemDimensions.height===`auto`?o.height:`${String(e.params.itemDimensions.height).replace(`px`,``)}px`,o.width=e.params.itemDimensions.width===`auto`?o.width:`${String(e.params.itemDimensions.width).replace(`px`,``)}px`):(o.height=a===0?`100%`:`${String(a)}px`,o.width=i===0?`100%`:`${String(i)}px`),e.currentScreenMode=r,e.iframeStyle=o},Pe=e=>{let t=Object.keys(v),n=[],r=[`appServer`,`language`,`apiHost`],i=[`key`,`token`,`screenMode`,`timezoneId`,`itemId`,`container`,`loaderBackground`,`loaderFontColor`,`loaderSpinnerColor`,`loaderSpinnerBackground`],a=[`itemDimensions`],o=[`mobile`,`tablet`,`desktop`,`largeScreen`,`fixed`,`auto`];for(let n of t)e.params[n]===null&&delete e.params[n];e.params=ce(e.params,v),(!e.params.dashboardId||typeof e.params.dashboardId!=`string`)&&(!e.params.dashboardSlug||typeof e.params.dashboardSlug!=`string`)&&(delete e.params.dashboardId,delete e.params.dashboardSlug);for(let t of r)typeof e.params[t]!=`string`&&(delete e.params[t],n.push(`${t} needs to be of type string.`));for(let t of i)typeof e.params[t]!=`string`&&e.params[t]!==null&&e.params[t]!==void 0&&(delete e.params[t],n.push(`${t} needs to be of type string or empty.`));if(e.params.screenMode&&!o.includes(e.params.screenMode)){let t=o.map(e=>`"${e}"`).join(`, `);n.push(`"screenMode" needs should be one of these types: ${t}`),e.params.screenMode=`auto`}e.params.itemId&&(e.params.itemEmbedding=!0);for(let t of a)typeof e.params[t]!=`object`&&e.params[t]!==null&&(delete e.params[t],n.push(`${t} needs to be of type object or empty.`));if(typeof e.params.switchScreenModeOnResize!=`boolean`&&(n.push(`switchScreenModeOnResize needs to be of type boolean.`),e.params.switchScreenModeOnResize=!0),e.params.itemDimensions)for(let t of[`width`,`height`])![`string`,`number`].includes(typeof e.params.itemDimensions[t])&&e.params.itemDimensions[t]!==null&&n.push(`itemDimensions ${t} needs to be of type string, number or empty.`);e.params=ce(e.params,v),e.params.screenMode&&e.params.screenMode!==`auto`&&(e.params.switchScreenModeOnResize=!1),e.params.itemDimensions.width!==`auto`&&(e.params.itemDimensions.width=Number.parseInt(`${e.params.itemDimensions.width}`.replace(`px`,``),10)||`auto`),e.params.itemDimensions.height!==`auto`&&(e.params.itemDimensions.height=Number.parseInt(`${e.params.itemDimensions.height}`.replace(`px`,``),10)||`auto`),e.params.itemEmbedding=!!e.params.itemId,(e.params.error||n.length>0)&&_(n.join(`
|
|
25
|
-
`),e.params)},Fe={type:`type`,slots:`slots`,options:`options`,appServer:`app-server`,apiHost:`api-host`,authKey:`auth-key`,authToken:`auth-token`,contextId:`context-id`,canFilter:`can-filter`,filters:`filters`,dashboardId:`dashboard-id`,itemId:`item-id`,aiMessageAssetId:`ai-message-asset-id`,dashboardContentsVersion:`dashboard-contents-version`,libVersion:`lib-version`},Ie=`luzmo-embed-container`,Le=`FEDERATION_DEBUG`,S={AT:`@`,HYPHEN:`-`,SLASH:`/`},Re={[S.AT]:`scope_`,[S.HYPHEN]:`_`,[S.SLASH]:`__`};Re[S.AT],S.AT,Re[S.HYPHEN],S.HYPHEN,Re[S.SLASH],S.SLASH;var ze=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({}),C=typeof ENV_TARGET<`u`?ENV_TARGET===`web`:typeof window<`u`&&window.document!==void 0;function Be(){return C}function Ve(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function He(){try{if(Be()&&window.localStorage)return!!localStorage.getItem(Le)}catch{return!1}return!1}function Ue(){return typeof process<`u`&&process.env&&process.env.FEDERATION_DEBUG?!!process.env.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:He()}var We=`[ Federation Runtime ]`,Ge=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function Ke(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}else if(`publicPath`in e)return!Be()&&!Ve()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`;else return console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``}var qe=e=>{console.warn(`${We}: ${e}`)};function Je(e){try{return JSON.stringify(e,null,2)}catch{return``}}var Ye=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function Xe(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function Ze(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?Xe(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:f={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:p},globalName:m,ssrRemoteEntry:h}=e.metaData,{exposes:g}=e,_={version:i||``,buildVersion:p,globalName:m,remoteEntry:Ye(l,u),remoteEntryType:d,remoteTypes:Ye(f.path,f.name),remoteTypesZip:f.zip||``,remoteTypesAPI:f.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:g?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={..._,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={..._,getPublicPath:o()},h){let e=Ye(h.path,h.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=h.type||`commonjs-module`}return a}function Qe(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var $e=`[ Module Federation ]`,et=console,tt=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function nt(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
26
|
-
`),n=t.filter(e=>!tt.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
27
|
-
`)}`:void 0}catch{return}}var rt=class{constructor(e,t=et){this.prefix=e,this.delegate=t??et}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??et}emit(e,t){let n=this.delegate,r=Ue()?nt():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=et[e];if(typeof t==`function`){t.call(et,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){Ue()&&this.emit(`debug`,e)}};function it(e){return new rt(e)}function at(e){let t=new rt(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}it($e),at($e);async function ot(e,t){try{return await e()}catch(e){!t&&qe(e);return}}function st(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function ct(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&st(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||=e.url,n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&st(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,ot(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function lt(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&st(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,ot(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function ut(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=ct({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var dt=new Map;function w(e){if(!e)throw Error(`import specifier is required`);if(dt.has(e))return dt.get(e);let t=Function(`name`,`return import(name)`)(e).then(e=>e).catch(t=>{throw console.error(`Error importing module ${e}:`,t),dt.delete(e),t});return dt.set(e,t),t}var ft=async(e,t,n)=>{let r=await((e,t)=>n.lifecycle.fetch.emit(e,t))(e,t||{});return!r||!(r instanceof Response)?fetch(e,t||{}):r},pt=typeof ENV_TARGET>`u`||ENV_TARGET!==`web`?(e,t,n,r)=>{if(r?.createScriptHook){let t=r.createScriptHook(e);t&&typeof t==`object`&&`url`in t&&(e=t.url)}let i;try{i=new URL(e)}catch(e){console.error(`Error constructing URL:`,e),t(Error(`Invalid URL: ${e}`));return}let a=async()=>r?.fetch?(e,t)=>ft(e,t,r):fetch,o=async(e,r)=>{try{let i=await(await e(r.href)).text(),[a,o]=await Promise.all([w(`path`),w(`vm`)]),s={exports:{},module:{exports:{}}},c=r.pathname.split(`/`).slice(0,-1).join(`/`),l=a.basename(r.pathname),u=new o.Script(`(function(exports, module, require, __dirname, __filename) {${i}\n})`,{filename:l,importModuleDynamically:o.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER??w}),d;d=(await w(`node:module`)).createRequire(r.protocol===`file:`||r.protocol===`node:`?r.href:a.join(process.cwd(),`__mf_require_base__.js`)),u.runInThisContext()(s.exports,s.module,d,c,l);let f=s.module.exports||s.exports;if(n&&f&&n.globalName){t(void 0,f[n.globalName]||f);return}t(void 0,f)}catch(e){t(e instanceof Error?e:Error(`Script execution error: ${e}`))}};a().then(async e=>{if(n?.type===`esm`||n?.type===`module`)return Et(i.href,{fetch:e,vm:await w(`vm`)}).then(async e=>{await e.evaluate(),t(void 0,e.namespace)}).catch(e=>{t(e instanceof Error?e:Error(`Script execution error: ${e}`))});o(e,i)}).catch(e=>{t(e)})}:(e,t,n,r)=>{t(Error(`createScriptNode is disabled in non-Node.js environment`))},mt=typeof ENV_TARGET>`u`||ENV_TARGET!==`web`?(e,t)=>new Promise((n,r)=>{pt(e,(e,i)=>{if(e)r(e);else{let e=t?.attrs?.globalName||`__FEDERATION_${t?.attrs?.name}:custom__`;n(globalThis[e]=i)}},t.attrs,t.loaderHook)}):(e,t)=>{throw Error(`loadScriptNode is disabled in non-Node.js environment`)},ht=new Map,gt=e=>e.startsWith(`http:`)||e.startsWith(`https:`),_t=e=>!e.startsWith(`./`)&&!e.startsWith(`../`)&&!e.startsWith(`/`)&&!e.includes(`:`);function vt(e){let t=new URL(e),n=encodeURIComponent(t.protocol.slice(0,-1)),r=encodeURIComponent(t.host),i=t.pathname.split(`/`).map(e=>encodeURIComponent(e)).join(`/`),a=encodeURIComponent(`${t.search}${t.hash}`);return`/${n}/${r}${i}${a?`/${a}`:``}`}function yt(e,t){let n=t.endsWith(`/`)?t:`${t}/`;return new URL(`__module_federation_remote__${vt(e)}`,n).href}async function bt(e){return e.startsWith(`node:`)?!0:_t(e)?(await w(`node:module`)).builtinModules.includes(e):!1}function xt(e){let t=e&&(typeof e==`object`||typeof e==`function`)?e:{default:e},n={...t};return Object.prototype.hasOwnProperty.call(n,`default`)||(n.default=t),n}async function St(e,t,n){if(typeof n.SyntheticModule!=`function`)throw Error(`vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.`);let r=xt(t),i=Object.keys(r),a=new n.SyntheticModule(i,function(){for(let e of i)this.setExport(e,r[e])},{identifier:e});return ht.set(e,a),await a.link(async()=>{throw Error(`Node.js built-in module "${e}" should not request child modules.`)}),await a.evaluate(),a}async function Ct(e,t){let n=`node-builtin:${e}`;return ht.has(n)?ht.get(n):St(n,await w(e),t)}async function wt(e,t,n){if(await bt(e))return Ct(e,n.vm);if(_t(e))throw Error(`Unsupported ESM module specifier "${e}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);let r=new URL(e,t).href;if(!gt(r))throw Error(`Unsupported ESM module specifier "${e}" resolved to "${r}". Only http(s) remote modules and Node.js built-in modules are supported.`);return Et(r,n)}async function Tt(e){if(e.status===`linked`&&await e.evaluate(),e.status===`errored`)throw e.error;return e}async function Et(e,t){if(ht.has(e))return ht.get(e);let{fetch:n,vm:r}=t;if(!gt(e))throw Error(`Unsupported ESM module URL "${e}". Only http(s) remote modules and Node.js built-in modules are supported.`);let i=await(await n(e)).text(),a=(await w(`node:url`)).pathToFileURL(process.cwd()).href,o=new r.SourceTextModule(i,{identifier:e,initializeImportMeta:t=>{t.url=yt(e,a)},importModuleDynamically:async n=>Tt(await wt(n,e,t))});return ht.set(e,o),await o.link(async n=>wt(n,e,t)),o}var Dt=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,Ot=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(Dt(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
28
|
-
`)};function kt(e,t,n,r,i,a){return r(Ot(e,t,n,i))}var T=`[ Federation Runtime ]`,At=it(T);function E(e,t,n,r,i){e||(n===void 0?D(t):D(t,n,r,void 0,i))}function D(e,t,n,r,i){if(t!==void 0)return kt(e,t,n??{},e=>{throw Error(`${T}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(T)||(a.message=`${T}: ${a.message}`),a):Error(`${T}: ${a}`)}function jt(e){e instanceof Error&&(e.message.startsWith(T)||(e.message=`${T}: ${e.message}`)),At.warn(e)}function Mt(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function Nt(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Pt(e){return e.entry!==void 0}function Ft(e){return!e.entry.includes(`.json`)}function It(e){return e&&typeof e==`object`}var Lt=Object.prototype.toString;function Rt(e){return Lt.call(e)===`[object Object]`}function zt(e){return Array.isArray(e)?e:[e]}function Bt(e){let t={url:``,type:`global`,globalName:``};return C||Ve()||!(`ssrRemoteEntry`in e)?`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:`ssrRemoteEntry`in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}var Vt=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},Ht=2e3,O=typeof globalThis==`object`?globalThis:window,k=(()=>{try{return document.defaultView}catch{return O}})(),Ut=k;function Wt(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function Gt(e,t){return Object.hasOwnProperty.call(e,t)}Gt(O,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||Wt(O,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var A=O.__GLOBAL_LOADING_REMOTE_ENTRY__;function Kt(e){Gt(e,`__VMOK__`)&&!Gt(e,`__FEDERATION__`)&&Wt(e,`__FEDERATION__`,e.__VMOK__),Gt(e,`__FEDERATION__`)||(Wt(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),Wt(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}Kt(O),Kt(k);function qt(e){O.__FEDERATION__.__INSTANCES__.push(e)}function Jt(){return O.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Yt(e,t=Ue()){t&&(O.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,O.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.0`)}function j(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}else D(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Xt=()=>k.__FEDERATION__.moduleInfo,Zt=(e,t)=>{let n=j(t,Nt(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=Nt(n),i=j(k.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},Qt=e=>Zt(e,k.__FEDERATION__.moduleInfo),$t=(e,t)=>{let n=Nt(e);return k.__FEDERATION__.moduleInfo[n]=t,k.__FEDERATION__.moduleInfo},en=e=>(k.__FEDERATION__.moduleInfo={...k.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete k.__FEDERATION__.moduleInfo[e]}),tn=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:O[n]}},nn=()=>k.__FEDERATION__.__GLOBAL_PLUGIN__,rn=e=>O.__FEDERATION__.__PRELOADED_MAP__.get(e),an=e=>O.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),on=e=>O.__FEDERATION__.__PRELOADED_ASSETS__.has(e),sn=e=>{let t=O.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>Ht){let e=t.values().next().value;e!==void 0&&t.delete(e)}},cn=`[0-9A-Za-z-]+`,ln=`(?:\\+(${cn}(?:\\.${cn})*))`,un=`0|[1-9]\\d*`,dn=`[0-9]+`,fn=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,pn=`(?:${dn}|${fn})`,mn=`(?:-?(${pn}(?:\\.${pn})*))`,hn=`(?:${un}|${fn})`,gn=`(?:-(${hn}(?:\\.${hn})*))`,_n=`${un}|x|X|\\*`,M=`[v=\\s]*(${_n})(?:\\.(${_n})(?:\\.(${_n})(?:${gn})?${ln}?)?)?`,vn=`^\\s*(${M})\\s+-\\s+(${M})\\s*$`,yn=`[v=\\s]*${`(${dn})\\.(${dn})\\.(${dn})`}${mn}?${ln}?`,bn=`((?:<|>)?=?)`,xn=`(\\s*)${bn}\\s*(${yn}|${M})`,Sn=`(?:~>?)`,Cn=`(\\s*)${Sn}\\s+`,wn=`(?:\\^)`,Tn=`(\\s*)${wn}\\s+`,En=`(<|>)?=?\\s*\\*`,Dn=`^${wn}${M}$`,On=`v?${`(${un})\\.(${un})\\.(${un})`}${gn}?${ln}?`,kn=`^${Sn}${M}$`,An=`^${bn}\\s*${M}$`,jn=`^${bn}\\s*(${On})$|^$`,Mn=`^\\s*>=\\s*0.0.0\\s*$`;function N(e){return new RegExp(e)}function P(e){return!e||e.toLowerCase()===`x`||e===`*`}function Nn(...e){return t=>e.reduce((e,t)=>t(e),t)}function Pn(e){return e.match(N(jn))}function Fn(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function In(e){return e.replace(N(vn),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=P(n)?``:P(r)?`>=${n}.0.0`:P(i)?`>=${n}.${r}.0`:`>=${t}`,s=P(c)?``:P(l)?`<${Number(c)+1}.0.0-0`:P(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function Ln(e){return e.replace(N(xn),`$1$2$3`)}function Rn(e){return e.replace(N(Cn),`$1~`)}function zn(e){return e.replace(N(Tn),`$1^`)}function Bn(e){return e.trim().split(/\s+/).map(e=>e.replace(N(Dn),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function Vn(e){return e.trim().split(/\s+/).map(e=>e.replace(N(kn),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function Hn(e){return e.split(/\s+/).map(e=>e.trim().replace(N(An),(e,t,n,r,i,a)=>{let o=P(n),s=o||P(r),c=s||P(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function Un(e){return e.trim().replace(N(En),``)}function Wn(e){return e.trim().replace(N(Mn),``)}function Gn(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Kn(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?Gn(t,i):-1:1}return 0}function qn(e,t){return Gn(e.major,t.major)||Gn(e.minor,t.minor)||Gn(e.patch,t.patch)||Kn(e,t)}function Jn(e,t){return e.version===t.version}function Yn(e,t){switch(e.operator){case``:case`=`:return Jn(e,t);case`>`:return qn(e,t)<0;case`>=`:return Jn(e,t)||qn(e,t)<0;case`<`:return qn(e,t)>0;case`<=`:return Jn(e,t)||qn(e,t)>0;case void 0:return!0;default:return!1}}function Xn(e){return Nn(Bn,Vn,Hn,Un)(e)}function Zn(e){return Nn(In,Ln,Rn,zn)(e.trim()).split(/\s+/).join(` `)}function Qn(e,t){if(!e)return!1;let n=Pn(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:Fn(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Zn(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Xn(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>Wn(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=Pn(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!Yn({operator:n,version:Fn(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var $n=`default`,er=`global`;function tr(e,t,n,r){let i;return i=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{D(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&D(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:i,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??ze.UNKNOWN,useIn:[]}:void 0}}function nr(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=zt(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(tr(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function rr(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===ze.NO_USE?!1:n===ze.CALCULATED?!0:r===`runtime-infer`?!t||sr(e,t):!1}function F(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!Qn(n(e),`<=${n(t)}`)}var ir=(e,t)=>{let n=t||function(e,t){return F(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},ar=e=>!!e.loaded||typeof e.lib==`function`,or=e=>!!e.loading,sr=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function cr(e,t,n,r){let i=e[t][n],a=``,o=rr(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!ar(i[e].treeShaking)&&F(e,t):!1:!0:!ar(i[e])&&F(e,t)};if(o){if(a=ir(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:ir(e[t][n],s),useTreesShaking:o}}var I=e=>ar(e)||or(e);function lr(e,t,n,r){let i=e[t][n],a=``,o=rr(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(I(i[t].treeShaking))return!I(i[e].treeShaking)||!!F(e,t);if(I(i[e].treeShaking))return!1}return I(i[t])?!I(i[e])||!!F(e,t):!I(i[e])&&F(e,t)};if(o){if(a=ir(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:ir(e[t][n],s),useTreesShaking:o}}function ur(e){return e===`loaded-first`?lr:cr}function dr(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=$n,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=ur(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:Ut.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!Qn(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?D(e):jt(e)}return{shared:r,useTreesShaking:d}}else{if(l===!1||l===`*`||Qn(u,l))return{shared:r,useTreesShaking:d};let n=rr(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(rr(i.treeShaking,c?.usedExports)&&Qn(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(Qn(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function fr(){return Ut.__FEDERATION__.__SHARE__}function pr(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[ir(t,function(e,n){return!ar(t[e])&&F(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var L=(e,t)=>{e.useIn||=[],Mt(e.useIn,t)};function mr(e,t){return t&&e.treeShaking?e.treeShaking:e}function hr(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function gr(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}else if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}else if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function _r(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var vr=`RUNTIME-001`,yr=`RUNTIME-002`,br=`RUNTIME-003`,xr=`RUNTIME-004`,Sr=`RUNTIME-005`,Cr=`RUNTIME-006`,wr=`RUNTIME-007`,Tr=`RUNTIME-008`,Er=`RUNTIME-009`,Dr=`RUNTIME-010`,Or=`RUNTIME-011`,kr=`RUNTIME-012`,Ar=`RUNTIME-013`,jr=`RUNTIME-014`,Mr=`RUNTIME-015`,Nr=`TYPE-001`,Pr=`BUILD-001`,Fr=`BUILD-002`,R={[vr]:`Failed to get remoteEntry exports.`,[yr]:`The remote entry interface does not contain "init"`,[br]:`Failed to get manifest.`,[xr]:`Failed to locate remote.`,[Sr]:`Invalid loadShareSync function call from bundler runtime`,[Cr]:`Invalid loadShareSync function call from runtime`,[wr]:`Failed to get remote snapshot.`,[Tr]:`Failed to load script resources.`,[Er]:`Please call createInstance first.`,[Dr]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[Or]:`The remoteEntry URL is missing from the remote snapshot.`,[kr]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[Ar]:`The manifest is not a valid Module Federation manifest.`,[jr]:`The remote does not expose the requested module.`,[Mr]:`Remote container initialization failed.`},Ir={[Nr]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},Lr={[Pr]:`Failed to find expose module.`,[Fr]:`PublicPath is required in prod mode.`};({...R,...Ir,...Lr});var Rr=`.then(callbacks[0]).catch(callbacks[1])`,zr=new WeakMap,Br=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function Vr(e){return e instanceof TypeError&&Br.some(t=>e.message.includes(t))}function Hr(e){return e===`esm`||e===`module`}async function Ur({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((i,a)=>{let o=e=>{if(Vr(e)){let t=e instanceof Error?e.message:String(e);try{D(Tr,R,{remoteName:n,resourceUrl:s},t)}catch(e){a(e);return}}a(e)},s=r?r(e):e;try{t?i(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${s}")${Rr}`)([i,o]):import(s).then(i).catch(o)}catch(e){D(`Failed to load ESM entry from "${s}". ${e instanceof Error?e.message:String(e)}`)}})}async function Wr({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${Rr}`)([n,r])}catch(t){D(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function Gr(e,t,n){let{remoteEntryKey:r,entryExports:i}=tn(e,t);return i||D(vr,R,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function Kr({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=tn(e,t);if(s)return s;let c=a?a(n):n;return ut(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>Gr(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);D(Tr,R,{remoteName:e,resourceUrl:c},n)})}async function qr({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return Hr(c)?Ur({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?Wr({entry:a,remoteEntryExports:t}):Kr({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}async function Jr({remoteInfo:e,loaderHook:t,resourceContext:n}){let{entry:r,entryGlobalName:i,name:a,type:o}=e,{entryExports:s}=tn(a,i);return s||mt(r,{attrs:{name:a,globalName:i,type:o},loaderHook:{createScriptHook:(r,i={})=>{let a=t.lifecycle.createScript.emit({url:r,attrs:i,remoteInfo:e,resourceContext:n?{...n,url:r}:void 0});if(a&&`url`in a)return a}}}).then(()=>Gr(a,i,r)).catch(e=>{D(`Failed to load Node.js entry for remote "${a}" from "${r}". ${e instanceof Error?e.message:String(e)}`)})}function Yr(e){let{entry:t,name:n}=e;return Ge(n,t)}async function Xr(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=Yr(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!A[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;A[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||((typeof ENV_TARGET<`u`?ENV_TARGET===`web`:C)?qr({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a}):Jr({remoteInfo:r,loaderHook:c,resourceContext:a}))).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>Xr({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:A,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}),zr.set(A[s],t)}let c=A[s];if(zr.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function z(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function Zr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Qr(e){let t=new Map;return[...e||[],...nn()].forEach(e=>{e&&(E(Rt(e),`Plugin configuration is invalid.`),E(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function $r(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function ei(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return Qr(e).forEach(e=>{if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let i=$r(e,e.apply?.(t));r.forEach(e=>{e.applyPlugin(i)})}),Array.from(n.values())}function ti(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function B(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(ti)??[],shared:t}}}function ni(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function ri(e,t){return t.map(t=>{let n=_r(e,t.nameOrAlias);return E(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&Je({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:ni(t)}})}function ii(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function ai(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function V(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function oi(e,t,n,r){return n?on(t)?Promise.resolve(V(e,t,`cached`)):(sn(t),r()):r()}async function si(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return V(r,a,`cached`);try{if(!await Xr({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return V(r,a,`success`)}catch(e){return V(r,a,ai(e)?`timeout`:`error`,e)}}function ci({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=lt({url:n,cb:()=>{o(V(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(V(i,n,ai(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function li({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=ct({url:n,cb:()=>{a(V(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(V(i,n,ai(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function ui(e,t){return{...e,resourceType:t}}function di(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(si(t,e,r,ui(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=ui(i,`css`);l.push(oi(o,r,a,()=>ci({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=ui(i,`css`);l.push(oi(o,r,a,()=>ci({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=li,u={fetchpriority:`high`,type:`text/javascript`};r?(n=ci,u={rel:`preload`,as:`script`}):Hr(e.type)&&(n=ci,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=ui(i,`js`);l.push(oi(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}function fi(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function pi(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var mi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:hr(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await Xr({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return E(r,`remoteEntryExports is undefined \n ${Je(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=pi(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});a?.init===void 0&&D(yr,R,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,B(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){D(Mr,R,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,B(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||D(jr,R,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:fi(r)},void 0,B(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=Vt(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},H=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){E(Rt(e),`Plugin configuration is invalid.`);let t=e.name;E(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){E(e,`A name is required.`);let t=this.registerPlugins[e];E(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},U=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},W=class extends U{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function hi(e,t){if(!It(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var gi=class extends U{constructor(e){super(),this.onerror=D,this.type=e}emit(e){It(e)||D(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(hi(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){jt(e),this.onerror(e)}return e}},G=class extends U{constructor(e){super(),this.onerror=D,this.type=e}emit(e){It(e)||D(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(jt(t),this.onerror(t),e),i=a=>{if(a!==void 0&&hi(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},_i=`Remote loading is disabled by experiments.optimization.disableRemote.`,vi=class{constructor(){this.hooks=new H({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error(_i)}preloadRemote(){throw Error(_i)}registerRemotes(){throw Error(_i)}getRemoteModuleAndOptions(){throw Error(_i)}initRawContainer(){throw Error(_i)}};function yi(e,t){let n=Bt(t);n.url||D(Or,R,{remoteName:e.name});let r=Ke(t,n.url);!C&&!r.startsWith(`http`)&&(r=`https:${r}`),e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function bi(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!Pt(t)||!Ft(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:hr(t.name,r)});yi(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&di(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function xi(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Si(e,t,n,r,i={},a){let{value:o}=j(e,Nt(t)),s=a||o;if(s&&!Qe(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=xi(r),a=s.remotesInfo[r];Si(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var Ci=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function wi(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(Si(r,n,(t,n,r)=>{let i;if(r)i=d;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=ni(e)}else if(f===!0)i=d;else return;let c=Ke(t,Bt(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let l=`modules`in t?t.modules:[],u=ii(i.exposes);u.length&&`modules`in t&&(l=t?.modules?.reduce((e,t)=>(u?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function p(e){let n=e.map(e=>Ke(t,e));return i.filter?n.filter(i.filter):n}if(l){let r=l.length;for(let s=0;s<r;s++){let r=l[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!rn(c)&&(i.resourceCategory===`all`?(a.push(...p(r.assets.css.async)),a.push(...p(r.assets.css.sync)),o.push(...p(r.assets.js.async)),o.push(...p(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...p(r.assets.css.sync)),o.push(...p(r.assets.js.sync))),an(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=dr(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{let n=u.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&zt(r).forEach(n=>{t(n,e)})})}let p=o.filter(e=>!c.has(e)&&!Ci(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!Ci(`link`,e)),jsAssetsWithoutEntry:p,entryAssets:s.filter(e=>!Ci(`script`,e.url))}}var Ti=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return C?Pt(i)&&Ft(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(yi(r,o),wi(t,n,r,a,o)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Ei(e,t){let n=Qt({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&j(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Xt(),remoteSnapshot:Qt({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Xt(),remoteSnapshot:Qt({name:e.name,version:`version`in e?e.version:void 0})}}var Di=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new H({beforeLoadRemoteSnapshot:new W(`beforeLoadRemoteSnapshot`),loadSnapshot:new G(`loadGlobalSnapshot`),loadRemoteSnapshot:new G(`loadRemoteSnapshot`),afterLoadSnapshot:new G(`afterLoadSnapshot`),beforeLoadManifest:new W(`beforeLoadManifest`),afterLoadManifest:new W(`afterLoadManifest`)}),this.manifestLoading=Ut.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=Qt({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},en({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!j(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c)if(Qe(c)){let r=C?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||``,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=$t({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}else if(Pt(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=$t(e,r);u=r,d=i}else D(wr,R,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,B(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Ei(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=z(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),D(br,R,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,B(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&D(Ar,R,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,B(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=Ze(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},Oi=class{constructor(){this.hooks=new H({})}},ki=class{constructor(e){this.hooks=new H({beforeRegisterShare:new gi(`beforeRegisterShare`),afterRegisterShare:new U(`afterRegisterShare`),afterResolve:new G(`afterResolve`),beforeLoadShare:new G(`beforeLoadShare`),loadShare:new W,afterLoadShare:new U(`afterLoadShare`),errorLoadShare:new U(`errorLoadShare`),resolveShare:new gi(`resolveShare`),initContainerShareScopeMap:new gi(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){jt(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){jt(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=nr(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let i=this.shareScopeMap[r]?.[e],a=i?.[n.version];i||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:a,registeredShared:this.shareScopeMap[r]?.[e]?.[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t?.context,i=pr({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i?.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,E(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=dr(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=mr(c,l);if(t.lib)return L(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,L(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}else{let i=(async()=>{let e=await t.get();return L(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}else{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=rr(s.treeShaking),a=mr(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,L(a,n.options.name);let{shared:i,useTreesShaking:o}=dr(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=mr(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=$n,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.context?.trigger||r||`runtime`,o=t?.initScope,s=[];if(r!==`build`){let{initTokens:t}=this;o||=[];let n=t[e];if(n||=t[e]={from:this.host.name},o.indexOf(n)>=0)return s;o.push(n)}let c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});let u=c[e],d=(t,n)=>{let{version:r,eager:i}=n;u[t]=u[t]||{};let o=u[t],s=o[r],c=s&&mr(s),d=!!(c&&(`eager`in c&&c.eager||`shareConfig`in c&&c.shareConfig?.eager));(!c||c.strategy!==`loaded-first`&&!c.loaded&&(!i==!d?l>o[r].from:i))&&(o[r]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:s,registeredShared:o[r],trigger:a})},f=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{r=await t.getEntry(void 0,i)}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,o,void 0,i))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&d(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&s.push(f(t.name))}),s}loadShareSync(e,t){let{host:n}=this,r=t?.context,i=pr({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i?.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t?.from,context:r})});let{shared:a}=dr(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return L(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return L(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&D(t?.from===`build`?Sr:Cr,R,{hostName:n.options.name,sharedPkgName:e},void 0,B(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}D(Cr,R,{hostName:n.options.name,sharedPkgName:e},void 0,B(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=fr(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},Ai=class{constructor(){this.shareScopeMap={},this.hooks=new H({afterResolve:new G(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},ji=class{constructor(e){this.hooks=new H({beforeRegisterRemote:new gi(`beforeRegisterRemote`),registerRemote:new gi(`registerRemote`),beforeRequest:new G(`beforeRequest`),afterMatchRemote:new W(`afterMatchRemote`),onLoad:new W(`onLoad`),afterLoadRemote:new W(`afterLoadRemote`),handlePreloadModule:new U(`handlePreloadModule`),errorLoadRemote:new W(`errorLoadRemote`),beforePreloadRemote:new W(`beforePreloadRemote`),generatePreloadAssets:new W(`generatePreloadAssets`),afterPreloadRemote:new W(`afterPreloadRemote`),loadEntry:new W}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=gr(n.options.remotes,e),i=e,a=r?.expose,o=r?z(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:h}=u;i=m,a=p,o=z(f);let g=await c.get(m,p,t,h),_=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?g:void 0,exposeModuleFactory:r?void 0:g,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof _==`function`?_:g}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=ri(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:hr(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=z(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await di(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new mi({host:r,remoteInfo:z({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=gr(t.options.remotes,i);if(!a)try{D(xr,R,{hostName:t.options.name,requestId:i},void 0,B(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=z(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;E(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new mi(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));E(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&C&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=$n,e.type||=er};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),qe(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=j(O.__FEDERATION__.moduleInfo,Nt(e)).key;delete O.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete Ut.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Ei(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&j(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;O[r]&&(Object.getOwnPropertyDescriptor(O,r)?.configurable?delete O[r]:O[r]=void 0);let i=Yr(o.remoteInfo);A[i]&&delete A[i];let a=n.buildVersion?Ge(n.name,n.buildVersion):n.name,s=O.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=O.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=fr(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),O.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){At.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},Mi=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,Ni=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,Pi=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,Fi=class{constructor(e){this.hooks=new H({beforeInit:new gi(`beforeInit`),init:new U,beforeInitContainer:new G(`beforeInitContainer`),initContainer:new G(`initContainer`)}),this.version=`2.9.0`,this.moduleCache=new Map,this.loaderHook=new H({getModuleInfo:new U,createScript:new U,createLink:new U,fetch:new W,loadEntryError:new W,afterLoadEntry:new W(`afterLoadEntry`),beforeInitRemote:new W(`beforeInitRemote`),afterInitRemote:new W(`afterInitRemote`),beforeGetExpose:new W(`beforeGetExpose`),afterGetExpose:new W(`afterGetExpose`),beforeExecuteFactory:new W(`beforeExecuteFactory`),afterExecuteFactory:new W(`afterExecuteFactory`),getModuleFactory:new W}),this.bridgeHook=new H({beforeBridgeRender:new U,afterBridgeRender:new U,beforeBridgeDestroy:new U,afterBridgeDestroy:new U,afterBridgeRouteSync:new U});let t=Ni&&Mi?[bi(),Ti()]:[],n={id:Zr(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:C};this.name=e.name,this.options=n,this.snapshotHandler=Ni?new Di(this):new Oi,this.sharedHandler=Pi?new ki(this):new Ai,this.remoteHandler=Ni?new ji(this):new vi,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&D(Ot(Dr,R)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=$n,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=Pi?nr(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=ei(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};function Ii(e){let t=new((Jt())||Fi)({id:`${e.name}@${e.version||Date.now()}`,...e});return qt(t),t}Yt(Fi);var Li=Ii({name:`luzmo-embed-runtime`,remotes:[]}),Ri=new Map,zi=0,Bi=new Set;function Vi(e){if(typeof document>`u`)return;let t;try{t=new URL(y(e)).origin}catch{return}if(Bi.has(t))return;Bi.add(t);let n=document.createElement(`link`);n.rel=`preconnect`,n.href=t,n.crossOrigin=`anonymous`,(document.head??document.documentElement).append(n)}function Hi(e,t){let n=y(e);if(e.startsWith(`http://localhost`))return`${n}/mf-manifest.json`;switch(t){case`DashboardApp`:case`VizItemApp`:return`${n}/dashboard-app/mf-manifest.json`;case`IQApp`:return`${n}/iq-app/mf-manifest.json`}}function Ui(e,t){return`${e}|${t}`}function Wi(e,t){let n=Ui(e,t),r=Ri.get(n);if(r)return r;let i={entry:Hi(e,t),registered:!1,remoteName:`luzmo_embed_${zi++}`};return Ri.set(n,i),i}function K(e,t=`DashboardApp`){Vi(e);let n=Wi(e,t);return n.module?Promise.resolve(n.module):n.loadPromise?n.loadPromise:(n.registered||=(Li.registerRemotes([{name:n.remoteName,entry:n.entry}]),!0),n.loadPromise=Li.loadRemote(`${n.remoteName}/${t}`).then(e=>{if(!e)throw Error(`Failed to load "${t}" from "${n.entry}".`);return n.module=e,e}).finally(()=>{n.loadPromise=void 0}),n.loadPromise)}var Gi=`0.1.104`,Ki=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,q=(e,t,n,r)=>{for(var i=r>1?void 0:r?qi(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Ki(t,n,i),i},J=`7.5.0`;function Ji(e){let t={type:`error`,errorMsg:e,error:{msg:e}};return{...t,data:t}}function Yi(...e){return e.find(e=>typeof e==`string`&&e.length>0)}function Xi(e){let t=e?.data??e??{};return Ji(Yi(t.errorMsg,t.error?.msg)??`Unknown error`)}var Zi=new class{constructor(){this._dashboardComponents=[]}},Qi=()=>{typeof window.__luzmoMessageHandler!=`function`&&(window.__luzmoMessageHandler=e=>{let t=Zi._dashboardComponents.find(t=>e.data.name===t._iframeId);if(t)switch(e.data?.type){case`load`:t.dispatchEvent(new CustomEvent(`load`,{detail:{data:e.data}})),t._loadTimeoutHandle&&=(clearTimeout(t._loadTimeoutHandle),void 0),t.iframeLoaded=!0,t.dimensions=e.data.dimensions,t._calculateDimAfterDashboardLoaded();break;case`error`:t._handleEmbedError(e.data);break;case`data`:x(t,e.data.requestId,e.data.data);break;case`filters`:x(t,e.data.requestId,e.data.filters);break;case`insights`:e.data.error?de(t,e.data.requestId,Error(e.data.error.message)):x(t,e.data.requestId,e.data.summary);break;case`dashboardContext`:x(t,e.data.requestId,e.data.context);break;case`getAccessibleDashboards`:x(t,e.data.requestId,e.data.accessibleDashboards);break;case`dashboardAction`:t.dispatchEvent(new CustomEvent(`dashboardAction`,{detail:{data:e.data}}));break;case`export`:e.data.error?de(t,e.data.requestId,e.data):(t.dispatchEvent(new CustomEvent(`exported`,{detail:{data:e.data}})),x(t,e.data.requestId,e.data));break;case`changedFilters`:t.dispatchEvent(new CustomEvent(`changedFilters`,{detail:{data:e.data}}));break;case`contextChanged`:t.dispatchEvent(new CustomEvent(`contextChanged`,{detail:{data:e.data}}));break;case`customEvent`:t.dispatchEvent(new CustomEvent(`customEvent`,{detail:{data:e.data}}));break;case`chartsRendered`:case`itemsRendered`:e.data.type=`itemsRendered`,t.dispatchEvent(new CustomEvent(`itemsRendered`,{detail:{data:e.data}}));break;case`setEditMode`:e.data.error?de(t,e.data.requestId,e.data):(x(t,e.data.requestId,e.data),t.params.editMode=e.data.editMode,t._containerStyle=fe(t),t.dimensions&&Ne(t));break;case`calculatedDimensions`:t.dimensions=e.data.dimensions,Ne(t);break;case`trackViewport`:e.data.enabled?t._startViewportTracking():t._stopViewportTracking();break;case`setSelectedData`:case`setFilters`:e.data.error?de(t,e.data.requestId,e.data):x(t,e.data.requestId,e.data);break;case`setPreview`:e.data.error?de(t,e.data.requestId,e.data):x(t,e.data.requestId,e.data);break}},window.addEventListener(`message`,window.__luzmoMessageHandler,!1))},$i=l`
|
|
29
|
-
:host {
|
|
30
|
-
display: block;
|
|
31
|
-
height: 100%;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@-webkit-keyframes spin {
|
|
35
|
-
0% {
|
|
36
|
-
-webkit-transform: rotate(0deg);
|
|
37
|
-
transform: rotate(0deg);
|
|
38
|
-
}
|
|
39
|
-
100% {
|
|
40
|
-
-webkit-transform: rotate(360deg);
|
|
41
|
-
transform: rotate(360deg);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@keyframes spin {
|
|
46
|
-
0% {
|
|
47
|
-
-webkit-transform: rotate(0deg);
|
|
48
|
-
transform: rotate(0deg);
|
|
49
|
-
}
|
|
50
|
-
100% {
|
|
51
|
-
-webkit-transform: rotate(360deg);
|
|
52
|
-
transform: rotate(360deg);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
:host {
|
|
56
|
-
position: relative;
|
|
57
|
-
width: 100%;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.luzmo-embed-dashboard {
|
|
61
|
-
background: transparent;
|
|
62
|
-
padding: 0;
|
|
63
|
-
border: 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.luzmo-embed-dashboard-ede {
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.luzmo-embed-container-ede {
|
|
70
|
-
width: 100%;
|
|
71
|
-
height: 100%;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/*
|
|
75
|
-
* Web component mode: the dashboard app renders directly (no iframe). Make its host fill the
|
|
76
|
-
* sized .dashboard-container so the app's internal height:100% chain resolves to the calculated
|
|
77
|
-
* dashboard height - exactly like the iframe gets its height. Without this the app collapses to
|
|
78
|
-
* its intrinsic size and its inner scroll container produces a second scrollbar, and content can
|
|
79
|
-
* spill outside the container.
|
|
80
|
-
*/
|
|
81
|
-
#dashboard-wc-container {
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
#dashboard-wc-container dashboard-component {
|
|
87
|
-
display: block;
|
|
88
|
-
width: 100%;
|
|
89
|
-
height: 100%;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.luzmo-container-loader {
|
|
93
|
-
width: 100%;
|
|
94
|
-
position: relative;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.luzmo-lc {
|
|
98
|
-
margin: 0 auto;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.luzmo-loading-message {
|
|
102
|
-
width: 100%;
|
|
103
|
-
height: 20px;
|
|
104
|
-
text-align: center;
|
|
105
|
-
margin-bottom: 16px;
|
|
106
|
-
font-family: Helvetica, Arial, sans-serif;
|
|
107
|
-
font-size: 14px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.luzmo-loading-circle {
|
|
111
|
-
box-sizing: border-box;
|
|
112
|
-
margin: 16px auto;
|
|
113
|
-
position: relative;
|
|
114
|
-
text-indent: -9999em;
|
|
115
|
-
animation: spin 0.6s infinite linear;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.luzmo-loading-circle,
|
|
119
|
-
.luzmo-loading-circle:after {
|
|
120
|
-
border-radius: 50%;
|
|
121
|
-
width: 32px;
|
|
122
|
-
height: 32px;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.itemEmbedding:after {
|
|
126
|
-
width: 24px;
|
|
127
|
-
height: 24px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.luzmo-error {
|
|
131
|
-
background: transparent;
|
|
132
|
-
padding: 48px 0;
|
|
133
|
-
margin: 0 auto;
|
|
134
|
-
width: 80%;
|
|
135
|
-
border: 0;
|
|
136
|
-
text-align: center;
|
|
137
|
-
min-height: 192px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.dashboard-error {
|
|
141
|
-
font-size: 30px;
|
|
142
|
-
background: transparent;
|
|
143
|
-
padding: 48px 0;
|
|
144
|
-
margin: 0 auto;
|
|
145
|
-
width: 80%;
|
|
146
|
-
border: 0;
|
|
147
|
-
text-align: center;
|
|
148
|
-
min-height: 192px;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.luzmo-loader {
|
|
152
|
-
top: 0;
|
|
153
|
-
left: 0;
|
|
154
|
-
width: 100%;
|
|
155
|
-
min-height: 400px;
|
|
156
|
-
position: absolute;
|
|
157
|
-
transition-duration: 0.3s;
|
|
158
|
-
}
|
|
159
|
-
`,ea=`DashboardApp`,Y=class extends c{constructor(){super(),this.language=`auto`,this.editorLanguage=`auto`,this.screenMode=`auto`,this.switchScreenModeOnResize=!0,this.editMode=`view`,this.embedMode=`iframe`,this.iframeStyle={},this._containerStyle={},this._loaderStyle={},this._lcStyle={},this._loadingCircleStyle={},this._containerLoaderStyle={},this._loaderMsg=``,this._itemEmbedding=!1,this.browserError=!1,this.browserErrorMsg=``,this.dashboardError=!1,this.browserNotSupported=[],this.libVersion=J+`-wc-luzmo`,this.isLibraryLoaded=!1,this.currentAuthKey=null,this.currentAuthToken=null,this.isInitCalled=!1,this.attributesMap={dashboardId:`dashboard-id`,dashboardSlug:`dashboard-slug`,itemId:`item-id`,language:`language`,editorLanguage:`editorLanguage`,screenMode:`screen-mode`,switchScreenModeOnResize:`switch-screen-mode-on-resize`,authKey:`auth-key`,authToken:`auth-token`,editMode:`edit-mode`,theme:`theme`,mainColor:`main-color`,loaderBackground:`loader-background`,loaderFontColor:`loader-font-color`,loaderSpinnerColor:`loader-spinner-color`,loaderSpinnerBackground:`loader-spinner-background`,appServer:`app-server`,apiHost:`api-host`,itemDimensions:`item-dimensions`,timezoneId:`timezone-id`},this.loaderSize=32,this.borderWidth=3,this.minHeight=400,this._viewportTrackingActive=!1,this._onViewportChange=()=>{this._postViewport()},this._containerId=b(),this._iframeId=`luzmo-dashboard-${this._containerId}`,this.iframeLoaded=!1,this.promises={},this.params=this._setOptions(),this._onResize=()=>{if(this.shadowRoot?.querySelector(`.dashboard-container`)){if(this.containerWidth=this.luzmoEmbedContainer.offsetWidth,this.params.switchScreenModeOnResize&&this.params.screenMode===`auto`)for(let e of te)e.width[0]<=window.innerWidth&&window.innerWidth<=e.width[1]&&(this.currentScreenMode=e.mode);this.iframeLoaded?this._calculateDimAfterDashboardLoaded():this.dimensions&&(this.containerWidth=this.luzmoEmbedContainer.offsetWidth,Ne(this))}},this._resizeObserver=new ResizeObserver(e=>{window.requestAnimationFrame(()=>{!Array.isArray(e)||e.length===0||this._onResize()})})}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect(),this._stopViewportTracking();for(let e of Object.keys(this.promises))this.promises[e].reject(Error(`Dashboard component was removed`))}_startViewportTracking(){this.embedMode===`iframe`&&(this._viewportTrackingActive||(this._viewportTrackingActive=!0,window.addEventListener(`scroll`,this._onViewportChange,{passive:!0,capture:!0}),window.addEventListener(`resize`,this._onViewportChange,{passive:!0})),this._postViewport())}_stopViewportTracking(){this._viewportTrackingActive&&(this._viewportTrackingActive=!1,window.removeEventListener(`scroll`,this._onViewportChange,{capture:!0}),window.removeEventListener(`resize`,this._onViewportChange))}_postViewport(){let e=this.iframe?.contentWindow;if(!e)return;let t=this.iframe.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=Math.max(t.top,0),i=Math.min(t.bottom,n),a=Math.max(i-r,0),o=Math.min(Math.max(-t.top,0),t.height);e.postMessage({action:`setViewport`,offsetTop:o,visibleHeight:a},`*`)}firstUpdated(){this._loaderMsg=ue(this)?.loadingMsg,this._loaderStyles(),Zi._dashboardComponents.push(this),this.luzmoEmbedContainer&&this._resizeObserver.observe(this.luzmoEmbedContainer)}initComponent(){this.params=this._setOptions(),this.isWebComponentViewMode()?K(this.params.appServer,ea).then(async()=>{this.isLibraryLoaded=!0,await this.updateComplete;let e=document.createElement(`dashboard-component`);this.setAllAttributesOnElement(e),e.addEventListener(`load`,t=>{this.containerWidth=e.offsetWidth,this.dimensions=t.detail.dimensions,Ne(this),window.dispatchEvent(new Event(`resize`)),this.dispatchEvent(new CustomEvent(`load`,t))}),e.addEventListener(`itemsRendered`,e=>this.dispatchEvent(new CustomEvent(`itemsRendered`,e))),e.addEventListener(`error`,e=>{this._handleEmbedError(e.detail)}),e.addEventListener(`customEvent`,e=>this.dispatchEvent(new CustomEvent(`customEvent`,e))),e.addEventListener(`changedFilters`,e=>this.dispatchEvent(new CustomEvent(`changedFilters`,e))),e.addEventListener(`dashboardAction`,e=>this.dispatchEvent(new CustomEvent(`dashboardAction`,e))),e.addEventListener(`export`,e=>this.dispatchEvent(new CustomEvent(`exported`,e))),e.addEventListener(`contextChanged`,e=>this.dispatchEvent(new CustomEvent(`contextChanged`,e)));let t=this.renderRoot.querySelector(`#dashboard-wc-container`);t&&(t.append(e),this.dashboardReference=e)}):(this.containerWidth=this.container?.clientWidth,Pe(this),ee(this),this._setupLoader(),this.params.error||(this._loaderStyles(),Qi(),this._iframeUrl=le(this),this.iframe?.setAttribute(`src`,this._iframeUrl),this.iframeStyle=_e(this)))}setAllAttributes(){this.dashboardReference&&this.setAllAttributesOnElement(this.dashboardReference)}setAllAttributesOnElement(e){if(e){this.params.dashboardId&&e.setAttribute(`dashboard-id`,this.params.dashboardId),this.params.appServer&&e.setAttribute(`app-server`,this.params.appServer),this.params.apiHost&&e.setAttribute(`api-host`,y(this.params.apiHost));for(let t in this.attributesMap)![`authKey`,`authToken`,`apiHost`,`itemDimensions`,`dashboardId`,`appServer`].includes(t)&&this.params[t]&&e.setAttribute(this.attributesMap[t],this.params[t]);this.params.itemDimensions&&e.setAttribute(`item-dimensions`,JSON.stringify(this.params.itemDimensions)),this.params.key&&e.setAttribute(`auth-key`,this.params.key),this.params.token&&e.setAttribute(`auth-token`,this.params.token)}}updated(e){let t=new Set([`dashboardId`,`dashboardSlug`,`itemId`,`language`,`editorLanguage`,`theme`,`editMode`,`screenMode`,`switchScreenModeOnResize`,`authToken`,`authKey`,`appServer`,`apiHost`,`timezoneId`,`itemDimensions`]),n=[`dashboardId`,`dashboardSlug`,`itemId`],r=!1;for(let t of n)r||=e.get(t)===void 0&&this[t]!==void 0;if(r&&!this.isInitCalled){this.initComponent(),this.isInitCalled=!0;return}if(this.isWebComponentViewMode()){if(e.has(`editMode`)&&!this.dashboardReference){this.iframeLoaded=!1,this._loadTimeoutHandle&&=(clearTimeout(this._loadTimeoutHandle),void 0),this.params=this._setOptions(),this.initComponent();return}if(this.dashboardReference){for(let[t]of e.entries())if(t===`appSever`)K(e[t],ea).then(async()=>{this.isLibraryLoaded=!0,await this.updateComplete,this.dashboardReference=this.renderRoot.querySelector(`dashboard-component`),this.setAllAttributes()});else if(this.attributesMap[t]){let e=this.attributesMap[t]??t,n=typeof this[t]==`object`?JSON.stringify(this[t]):this[t]?.toString()||this[t];this.dashboardReference.setAttribute(e,n)}}}else for(let[n]of e.entries())t.has(n)&&n!==`editMode`?this._reloadIframeContent():t.has(n)&&n===`editMode`&&(this.iframeLoaded?(this.setEditMode(this.editMode),this.params=this._setOptions()):this._reloadIframeContent())}_reloadIframeContent(){if(this.params=this._setOptions(),Pe(this),this._setupLoader(),this.params.error){this._loadTimeoutHandle&&=(clearTimeout(this._loadTimeoutHandle),void 0),this._loaderStyles();return}this.iframeLoaded=!1,this._loadTimeoutHandle&&clearTimeout(this._loadTimeoutHandle),this._loadTimeoutHandle=setTimeout(()=>{console.warn(`Failed to load dashboard, appServer is likely down or unreachable.`)},15*1e3),this._loaderStyles(),this._iframeUrl=le(this),this.iframe&&this._updateIframeUrl(),this.iframeStyle=_e(this)}_setOptions(){let e={dashboardId:this.dashboardId,dashboardSlug:this.dashboardSlug};return this.itemId?(e.itemId=this.itemId,this._itemEmbedding=!0):this._itemEmbedding=!1,this.language&&(e.language=this.language),this.editorLanguage&&(e.editorLanguage=this.editorLanguage),this.screenMode&&(e.screenMode=this.screenMode),e.switchScreenModeOnResize=this.switchScreenModeOnResize,this.authToken&&(e.token=this.authToken),this.authKey&&(e.key=this.authKey),this.editMode&&(e.editMode=this.editMode),this.theme&&(e.theme=this.theme),this.mainColor&&(e.mainColor=this.mainColor),this.loaderBackground&&(e.loaderBackground=this.loaderBackground),this.loaderFontColor&&(e.loaderFontColor=this.loaderFontColor),this.loaderSpinnerColor&&(e.loaderSpinnerColor=this.loaderSpinnerColor),this.loaderSpinnerBackground&&(e.loaderSpinnerBackground=this.loaderSpinnerBackground),this.timezoneId&&(e.timezoneId=this.timezoneId),this.itemDimensions&&(e.itemDimensions=this.itemDimensions),this.appServer?(this.appServer=this.isWebComponentViewMode()?y(this.appServer):re(this.appServer),e.appServer=this.appServer):(this.appServer=re(v.appServer),e.appServer=this.appServer),this.apiHost?(this.apiHost=this.isWebComponentViewMode()?y(this.apiHost):re(this.apiHost),e.apiHost=this.apiHost):(this.apiHost=this.appServer.includes(`luzmo.com`)?this.appServer.replace(`app`,`api`):this.appServer,e.apiHost=this.apiHost),this.currentAuthKey=this.authKey,this.currentAuthToken=this.authToken,e}_updateIframeUrl(){ye(this.iframe,this._iframeUrl)}_setupLoader(){let e=ue(this);this._loaderMsg=e.loadingMsg,e.errorMsg&&this._handleEmbedError({errorMsg:e.errorMsg},`browser`)}_handleEmbedError(e,t=`dashboard`){let n=Xi(e),r=n.errorMsg;t===`browser`?(this.browserError=!0,this.browserErrorMsg=r):(this.dashboardError=!0,this.iframeLoaded=!0),this._loadTimeoutHandle&&=(clearTimeout(this._loadTimeoutHandle),void 0),this._displayError(),console.error(`Dashboard error:`,r),this.dispatchEvent(new CustomEvent(`error`,{detail:n}))}_displayError(){this.dashboardError&&(this._loaderStyles(),this.iframeStyle.opacity=1),this.browserError&&(this._containerStyle.display=`none`)}_calculateDimAfterDashboardLoaded(){this.dashboardError=!1,this._loaderStyles(),Ne(this)}_loaderStyles(){this._containerStyle=fe(this),this._loaderStyle=me(this),this._loadingCircleStyle=he(this),this._containerLoaderStyle=pe(this),this._lcStyle=ge(this)}static get styles(){return[$i]}render(){let e,t=u`
|
|
160
|
-
<div
|
|
161
|
-
class="luzmo-container-loader"
|
|
162
|
-
id="luzmo-container-loader-${this._containerId}"
|
|
163
|
-
style=${h(this._containerLoaderStyle)}
|
|
164
|
-
>
|
|
165
|
-
<div
|
|
166
|
-
class="luzmo-loader"
|
|
167
|
-
id="luzmo-loader-${this._containerId}"
|
|
168
|
-
style=${h(this._loaderStyle)}
|
|
169
|
-
>
|
|
170
|
-
<div
|
|
171
|
-
class="luzmo-lc"
|
|
172
|
-
style=${h(this._lcStyle)}
|
|
173
|
-
>
|
|
174
|
-
<div
|
|
175
|
-
class="luzmo-loading-circle"
|
|
176
|
-
style=${h(this._loadingCircleStyle)}
|
|
177
|
-
></div>
|
|
178
|
-
${this._itemEmbedding?``:u`
|
|
179
|
-
<div
|
|
180
|
-
class="luzmo-loading-message"
|
|
181
|
-
style=${h({color:this.loaderFontColor})}
|
|
182
|
-
>
|
|
183
|
-
${this._loaderMsg}
|
|
184
|
-
</div>
|
|
185
|
-
`}
|
|
186
|
-
</div>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
`;return e=this.isWebComponentViewMode()?this.isLibraryLoaded?u`
|
|
190
|
-
${this.dashboardId||this.dashboardSlug?u`
|
|
191
|
-
<div id="dashboard-wc-container"></div>
|
|
192
|
-
`:u`
|
|
193
|
-
<div id="luzmo-error-${this._containerId}">
|
|
194
|
-
<h3 class="luzmo-error">${this.browserErrorMsg}</h3>
|
|
195
|
-
</div>
|
|
196
|
-
`}
|
|
197
|
-
`:u`${t}`:u`
|
|
198
|
-
${this.dashboardId||this.dashboardSlug?u`
|
|
199
|
-
${t}
|
|
200
|
-
<iframe
|
|
201
|
-
class="luzmo-embed-dashboard ${this.isWebComponentViewMode()?``:`luzmo-embed-dashboard-ede`}"
|
|
202
|
-
id="${this._iframeId}"
|
|
203
|
-
name="${this._iframeId}"
|
|
204
|
-
style=${h(this.iframeStyle)}
|
|
205
|
-
src="${this._iframeUrl}"
|
|
206
|
-
frameborder="0"
|
|
207
|
-
></iframe>
|
|
208
|
-
`:u`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
|
|
209
|
-
${this.browserError?u`
|
|
210
|
-
<div id="luzmo-error-${this._containerId}">
|
|
211
|
-
<h3 class="luzmo-error">${this.browserErrorMsg}</h3>
|
|
212
|
-
</div>
|
|
213
|
-
`:``}
|
|
214
|
-
`,u`
|
|
215
|
-
<div class="${Ie} ${this.isWebComponentViewMode()?``:`${Ie}-ede`}">
|
|
216
|
-
<div
|
|
217
|
-
class="dashboard-container"
|
|
218
|
-
style=${h(Object.assign({},this._containerStyle,{width:this.iframeStyle.width??`100%`,height:this.iframeStyle.height??`100%`}))}
|
|
219
|
-
>
|
|
220
|
-
${e}
|
|
221
|
-
</div>
|
|
222
|
-
</div>
|
|
223
|
-
|
|
224
|
-
`}getDashboards(){return new Promise(e=>e(Zi._dashboardComponents))}getData(e){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.getData(e):this.isWebComponentViewMode()?Promise.reject():Ce(this,this.iframe,e)}getFilters(){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.getFilters():this.isWebComponentViewMode()?Promise.reject():we(this,this.iframe)}getInsights(e){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.getInsights(e):this.isWebComponentViewMode()?Promise.reject(Error(`getInsights is not available: dashboard reference is not ready.`)):Te(this,this.iframe,e)}getDashboardContext(){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.getDashboardContext():this.isWebComponentViewMode()?Promise.reject(Error(`getDashboardContext is not available: dashboard reference is not ready.`)):Se(this,this.iframe)}setSelectedData(e,t){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.setSelectedData(e,t):this.isWebComponentViewMode()?Promise.reject():Me(this,this.iframe,e,t)}setAuthorization(e,t){return this.currentAuthKey=e,this.currentAuthToken=t,this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.setAuthorization(e,t):this.isWebComponentViewMode()?Promise.reject():ke(this,this.iframe,e,t)}refreshData(e){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.refreshData(e):this.isWebComponentViewMode()?Promise.reject():e?Ee(this,this.iframe,e):Ee(this,this.iframe)}reloadDashboard(){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.reloadDashboard():this.isWebComponentViewMode()?Promise.reject():De(this,this.iframe)}exportDashboard(e){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.exportDashboard(e):this.isWebComponentViewMode()?Promise.reject():e?be(this,this.iframe,e):be(this,this.iframe)}getAccessibleDashboards(){return xe(this)}addFilters(e,t){return this.dashboardReference.addFilters(e,t)}setEditMode(e){return this.dashboardReference&&e===`view`?(this.editMode=`view`,this.params.editMode=`view`,this.initComponent(),Promise.resolve({type:`setEditMode`,editMode:e})):this.dashboardReference&&[`editFull`,`editLimited`].includes(e)?(this.editMode=e,this.params.editMode=e,this.initComponent(),Promise.resolve({type:`setEditMode`,editMode:e})):this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.setEditMode(e):this.isWebComponentViewMode()?Promise.reject():Ae(this,this.iframe,e)}setPreview(e){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.setPreview(e):je(this,this.iframe,e)}sendExportEmail(e,t,n){return this.isWebComponentViewMode()&&this.dashboardReference?this.dashboardReference.sendExportEmail(e,t,n):this.isWebComponentViewMode()?Promise.reject():Oe(this,this.iframe,e,t,n)}isWebComponentViewMode(){return this.embedMode===`webComponent`&&(this.editMode===`view`||this.editMode===void 0)}};q([p(`.dashboard-container`)],Y.prototype,`container`,2),q([p(`.${Ie}`)],Y.prototype,`luzmoEmbedContainer`,2),q([p(`iframe`)],Y.prototype,`iframe`,2),q([f()],Y.prototype,`dashboardId`,2),q([f()],Y.prototype,`dashboardSlug`,2),q([f()],Y.prototype,`itemId`,2),q([f()],Y.prototype,`language`,2),q([f()],Y.prototype,`editorLanguage`,2),q([f()],Y.prototype,`screenMode`,2),q([f({converter:{fromAttribute:e=>e===`true`,toAttribute:String}})],Y.prototype,`switchScreenModeOnResize`,2),q([f()],Y.prototype,`editMode`,2),q([f()],Y.prototype,`theme`,2),q([f()],Y.prototype,`mainColor`,2),q([f()],Y.prototype,`authToken`,2),q([f()],Y.prototype,`authKey`,2),q([f()],Y.prototype,`loaderBackground`,2),q([f()],Y.prototype,`loaderFontColor`,2),q([f()],Y.prototype,`loaderSpinnerColor`,2),q([f()],Y.prototype,`loaderSpinnerBackground`,2),q([f()],Y.prototype,`appServer`,2),q([f()],Y.prototype,`timezoneId`,2),q([f()],Y.prototype,`apiHost`,2),q([f({type:Object})],Y.prototype,`itemDimensions`,2),q([f()],Y.prototype,`embedMode`,2),q([f({attribute:!1})],Y.prototype,`_containerId`,2),q([f({attribute:!1})],Y.prototype,`_iframeId`,2),q([f({attribute:!1})],Y.prototype,`params`,2),q([f({attribute:!1})],Y.prototype,`_iframeUrl`,2),q([f({attribute:!1})],Y.prototype,`iframeLoaded`,2),q([f({attribute:!1})],Y.prototype,`promises`,2),q([f({attribute:!1})],Y.prototype,`iframeStyle`,2),q([f({attribute:!1})],Y.prototype,`_containerStyle`,2),q([f({attribute:!1})],Y.prototype,`_loaderStyle`,2),q([f({attribute:!1})],Y.prototype,`_lcStyle`,2),q([f({attribute:!1})],Y.prototype,`_loadingCircleStyle`,2),q([f({attribute:!1})],Y.prototype,`_containerLoaderStyle`,2),q([f({attribute:!1})],Y.prototype,`_loaderMsg`,2),q([f({attribute:!1})],Y.prototype,`containerWidth`,2),q([f({attribute:!1})],Y.prototype,`dimensions`,2),q([f({attribute:!1})],Y.prototype,`currentScreenMode`,2),q([f({attribute:!1})],Y.prototype,`_itemEmbedding`,2),q([f({attribute:!1})],Y.prototype,`browserError`,2),q([f({attribute:!1})],Y.prototype,`browserErrorMsg`,2),q([f({attribute:!1})],Y.prototype,`dashboardError`,2),q([f({attribute:!1})],Y.prototype,`browserNotSupported`,2),q([f()],Y.prototype,`libVersion`,2),q([m()],Y.prototype,`isLibraryLoaded`,2),q([m()],Y.prototype,`dashboardReference`,2),q([m()],Y.prototype,`currentAuthKey`,2),q([m()],Y.prototype,`currentAuthToken`,2),q([m()],Y.prototype,`isInitCalled`,2);var ta=class extends Y{};customElements.get(`luzmo-embed-dashboard`)||customElements.define(`luzmo-embed-dashboard`,ta);var na=Gi,ra=`VizItemApp`;function ia(e){let t=new Set;for(let n of e??[])for(let e of n?.content??[]){let n=e,r=n.datasetId??n.set;r&&t.add(r)}return[...t]}var X=class extends c{constructor(){super(...arguments),this.appServer=`https://app.luzmo.com`,this.apiHost=`https://api.luzmo.com`,this.slots=[],this.version=J+`-wc-luzmo`,this.dashboardContentsVersion=na,this.libVersion=J+`-wc-luzmo`,this.postInitCallQueue=[]}static{this.styles=l`
|
|
225
|
-
:host {
|
|
226
|
-
display: block;
|
|
227
|
-
width: 100%;
|
|
228
|
-
height: 100%;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
luzmo-embed-viz-item {
|
|
232
|
-
width: 100%;
|
|
233
|
-
height: 1000%;
|
|
234
|
-
display: block;
|
|
235
|
-
}
|
|
236
|
-
`}createRenderRoot(){return this.style.display||(this.style.display=`block`),this.style.height||(this.style.height=`100%`),this.style.width||(this.style.width=`100%`),this}canInitializeVizItem(){return!!(this.type||this.dashboardId&&this.itemId)}getFilters(){return this.chartElement.getFilters()}getVizItemContext(){let e=this.slots??[];return{id:this.contextId??this.getAttribute(`context-id`)??this.id??this.itemId??``,type:this.type,slots:e,options:this.options,filters:typeof this.chartElement?.getContextFilters==`function`?this.chartElement.getContextFilters():typeof this.chartElement?.getFilters==`function`?this.getFilters():[],datasetIds:ia(e)}}export(e=`png`){return this.chartElement.export(e)}getData(){return this.chartElement.getData()}getInsights(e){return this.chartElement.getInsights(e)}refreshData(){return this.chartElement.refreshData()}setSelectedData(e){return this.chartElement.setSelectedData(void 0,e)}setAuthorization(e,t){return this.chartElement.setAuthorization(e,t)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`selecteddata`&&(this.chartElement?this.setSelectedData(JSON.parse(n??`{}`)):this.postInitCallQueue.push([this.setSelectedData,[JSON.parse(n??`{}`)]]))}async firstUpdated(e){super.firstUpdated(e),this.canInitializeVizItem()&&(await K(this.appServer,ra),this.createAndAppendElement())}createAndAppendElement(){this.chartElement||(this.chartElement=document.createElement(`chart-component`),this.chartElement.setAttribute(`embedding-mode`,`chart`),this.chartElement.style.height=`100%`,this.chartElement.style.width=`100%`,this.chartElement.style.display=`block`,this.chartElement.addEventListener(`load`,e=>this.dispatchEvent(new CustomEvent(`load`,e))),this.chartElement.addEventListener(`rendered`,e=>{if(this.postInitCallQueue?.length>0)for(let e of this.postInitCallQueue)e[0].bind(this)(...e[1]);else this.selectedData&&this.setSelectedData(this.selectedData);this.dispatchEvent(new CustomEvent(`rendered`,e))}),this.chartElement.addEventListener(`changedFilters`,e=>{this.dispatchEvent(new CustomEvent(`changedFilters`,e)),this.dispatchEvent(new CustomEvent(`contextChanged`,{detail:{data:{type:`contextChanged`,context:this.getVizItemContext()}}}))}),this.chartElement.addEventListener(`exported`,e=>this.dispatchEvent(new CustomEvent(`exported`,e))),this.chartElement.addEventListener(`customEvent`,e=>this.dispatchEvent(new CustomEvent(`customEvent`,e))),this.chartElement.addEventListener(`error`,e=>{this.dispatchEvent(new CustomEvent(`error`,{detail:Xi(e.detail)}))}),this.chartElement.addEventListener(`authorizationExpired`,e=>this.dispatchEvent(new CustomEvent(`authorizationExpired`,e))),this.updateVizItemProperties(),this.renderRoot.append(this.chartElement))}updateVizItemProperties(){if(this.chartElement)for(let e in Fe){let t=this[e];if(t){let n=[`appServer`,`apiHost`].includes(e)?y(t):t;this.chartElement.setAttribute(Fe[e],typeof n==`object`?JSON.stringify(n):n)}}}async updated(e){if(this.chartElement)for(let[t]of e.entries()){let e=Fe[t]??t,n=typeof this[t]==`object`?JSON.stringify(this[t]):this[t]?.toString()??this[t];this.chartElement.setAttribute(e,n)}else this.canInitializeVizItem()&&(await K(this.appServer,ra),this.createAndAppendElement())}render(){return u` `}};q([f()],X.prototype,`appServer`,2),q([f()],X.prototype,`apiHost`,2),q([f({type:Array})],X.prototype,`slots`,2),q([f({type:Object})],X.prototype,`options`,2),q([f()],X.prototype,`type`,2),q([f()],X.prototype,`authKey`,2),q([f()],X.prototype,`authToken`,2),q([f()],X.prototype,`version`,2),q([f()],X.prototype,`contextId`,2),q([f({converter:e=>{try{return JSON.parse(e)}catch{return e}}})],X.prototype,`canFilter`,2),q([f({type:Array})],X.prototype,`filters`,2),q([f()],X.prototype,`dashboardId`,2),q([f()],X.prototype,`itemId`,2),q([f({attribute:`ai-message-asset-id`})],X.prototype,`aiMessageAssetId`,2),q([f({type:Object})],X.prototype,`selectedData`,2),q([f()],X.prototype,`dashboardContentsVersion`,2),q([f()],X.prototype,`libVersion`,2);var aa=class extends X{};customElements.get(`luzmo-embed-viz-item`)||customElements.define(`luzmo-embed-viz-item`,aa);var oa={aiEndpoint:`ai-endpoint`,appServer:`app-server`,apiHost:`api-host`,options:`options`,initialSuggestionsDatasetId:`initialSuggestionsDatasetId`,authKey:`auth-key`,authToken:`auth-token`,version:`version`,libVersion:`lib-version`,aydHost:`ayd-host`,availableDatasets:`available-datasets`,dashboardContext:`dashboard-context`,dashboardId:`dashboard-id`,contextIds:`context-ids`,agentId:`agent-id`},sa=`luzmo-iq-embed-chat`,ca=`luzmo-iq-chat-component`,Z=class extends c{constructor(){super(...arguments),this.appServer=`https://app.luzmo.com`,this.apiHost=`https://api.luzmo.com`,this.version=J+`-wc-luzmo`,this.libVersion=J+`-wc-luzmo`,this.remoteEntryServer=`http://localhost:4202/`,this.aydHost=`https://ayd.luzmo.com/`}static{this.styles=l`
|
|
237
|
-
:host {
|
|
238
|
-
display: block;
|
|
239
|
-
width: 100%;
|
|
240
|
-
height: 100%;
|
|
241
|
-
}
|
|
242
|
-
`}createRenderRoot(){return this}async firstUpdated(e){super.firstUpdated(e),await K(this.calculatedAppServer,`IQApp`),this.createAndAppendElement()}get calculatedAppServer(){return this.appServer.startsWith(`http://localhost`)?this.remoteEntryServer:this.appServer}createAndAppendElement(){this.chartElement||(this.chartElement=document.createElement(ca),this.chartElement.addEventListener(`load`,e=>this.dispatchEvent(new CustomEvent(`load`,e))),this.chartElement.addEventListener(`connectionStatusChanged`,e=>this.dispatchEvent(new CustomEvent(`connectionStatusChanged`,{detail:e.detail}))),this.updateVizItemProperties(),this.renderRoot.append(this.chartElement))}updateVizItemProperties(){if(this.chartElement)for(let e in oa){let t=this[e];if(t){let n=[`appServer`,`apiHost`,`aydHost`].includes(e)?y(t):t;this.chartElement.setAttribute(oa[e],typeof n==`object`?JSON.stringify(n):n)}}}async updated(e){if(this.chartElement)for(let[t]of e.entries()){let e=oa[t]??t,n=this[t];if(n==null){this.chartElement.removeAttribute(e);continue}let r=typeof n==`object`?JSON.stringify(n):n.toString();this.chartElement.setAttribute(e,r)}else await K(this.calculatedAppServer,`IQApp`),this.createAndAppendElement()}render(){return u``}connectedCallback(){super.connectedCallback();let e=document.querySelector(sa);if(!e)return;let t=new MutationObserver(()=>{let n=e.querySelector(`*[slot="custom-chat-widget-content"]`);if(!n)return;let r=e.querySelector(ca);r&&(r.append(n),t.disconnect())});t.observe(e,{childList:!0,subtree:!0})}};q([f()],Z.prototype,`appServer`,2),q([f()],Z.prototype,`apiHost`,2),q([f({type:Object})],Z.prototype,`options`,2),q([f({type:String})],Z.prototype,`initialSuggestionsDatasetId`,2),q([f()],Z.prototype,`aiEndpoint`,2),q([f()],Z.prototype,`authKey`,2),q([f()],Z.prototype,`authToken`,2),q([f()],Z.prototype,`version`,2),q([f()],Z.prototype,`libVersion`,2),q([f()],Z.prototype,`remoteEntryServer`,2),q([f()],Z.prototype,`aydHost`,2),q([f({type:Array})],Z.prototype,`availableDatasets`,2),q([f({type:Object})],Z.prototype,`dashboardContext`,2),q([f()],Z.prototype,`dashboardId`,2),q([f({type:Array})],Z.prototype,`contextIds`,2),q([f()],Z.prototype,`agentId`,2),customElements.get(sa)||customElements.define(sa,Z);var la={aiEndPoint:`ai-end-point`,appServer:`app-server`,apiHost:`api-host`,options:`options`,authKey:`auth-key`,authToken:`auth-token`,version:`version`,libVersion:`lib-version`,messages:`messages`},ua=`luzmo-iq-embed-answer`,Q=class extends c{constructor(){super(...arguments),this.appServer=`https://app.luzmo.com`,this.apiHost=`https://api.luzmo.com`,this.version=J+`-wc-luzmo`,this.libVersion=J+`-wc-luzmo`,this.remoteEntryServer=`http://localhost:4202`}static{this.styles=l`
|
|
243
|
-
:host {
|
|
244
|
-
display: block;
|
|
245
|
-
width: 100%;
|
|
246
|
-
height: 100%;
|
|
247
|
-
}
|
|
248
|
-
`}createRenderRoot(){return this}async firstUpdated(e){super.firstUpdated(e),await K(this.calculatedAppServer,`IQApp`),this.createAndAppendElement()}get calculatedAppServer(){return this.appServer.startsWith(`http://localhost`)?this.remoteEntryServer:this.appServer}createAndAppendElement(){this.chartElement||(this.chartElement=document.createElement(`luzmo-iq-answer-component`),this.chartElement.addEventListener(`addQuestion`,e=>this.dispatchEvent(new CustomEvent(`addQuestion`,e))),this.chartElement.addEventListener(`addAnswer`,e=>this.dispatchEvent(new CustomEvent(`addAnswer`,e))),this.updateVizItemProperties(),this.renderRoot.append(this.chartElement))}updateVizItemProperties(){if(this.chartElement)for(let e in la){let t=this[e];if(t){let n=[`appServer`,`apiHost`].includes(e)?y(t):t;this.chartElement.setAttribute(la[e],typeof n==`object`?JSON.stringify(n):n)}}}async updated(e){if(this.chartElement)for(let[t]of e.entries()){let e=la[t]??t,n=typeof this[t]==`object`?JSON.stringify(this[t]):this[t]?.toString()??this[t];this.chartElement.setAttribute(e,n)}else await K(this.calculatedAppServer,`IQApp`),this.createAndAppendElement()}render(){return u` `}};q([f()],Q.prototype,`appServer`,2),q([f()],Q.prototype,`apiHost`,2),q([f({type:Object})],Q.prototype,`options`,2),q([f()],Q.prototype,`aiEndPoint`,2),q([f()],Q.prototype,`authKey`,2),q([f()],Q.prototype,`authToken`,2),q([f()],Q.prototype,`messages`,2),q([f()],Q.prototype,`version`,2),q([f()],Q.prototype,`libVersion`,2),q([f()],Q.prototype,`remoteEntryServer`,2),customElements.get(ua)||customElements.define(ua,Q),c.disableWarning?.(`change-in-update`);var da={icon:[32,32,`M16 0a16 16 0 1 0 16 16A16 16 0 0 0 16 0m0 7q1.4 0 1.5 1.5c0 2-3 2-3 0 0-1 .8-1.5 1.5-1.5m0 5q.9 0 1 1v10c0 1.3-2 1.3-2 0V13q.1-1 1-1`],name:`info-circle`},fa={icon:[32,32,`M18.05 5.11a1.5 1.5 0 1 1 2.9.8l-.29 1.02a13.67 13.67 0 0 1-1.54 3.56 1 1 0 0 0 .85 1.52H28a2 2 0 0 1 1.07 3.7 1 1 0 0 0-.33 1.32 2 2 0 0 1-.82 2.76 1 1 0 0 0-.33 1.5 1.99 1.99 0 0 1-.96 3.12 1 1 0 0 0-.67 1.17A2 2 0 0 1 24 28h-5.6c-.98 0-1.94-.3-2.77-.84l-2.4-1.6a4.94 4.94 0 0 1-1.4-1.42 1 1 0 0 0-1.4-.29 1 1 0 0 0-.28 1.4c.5.76 1.17 1.43 1.96 1.97l2.4 1.6a6.98 6.98 0 0 0 3.89 1.18H24a4 4 0 0 0 4-4v-.04a4 4 0 0 0 1.7-5 4 4 0 0 0 1.13-4.13A4 4 0 0 0 28 10h-6.35c.39-.82.7-1.67.94-2.56l.29-1.02a3.51 3.51 0 0 0-6.76-1.85l-.28 1.03a8.5 8.5 0 0 1-3.64 4.93l-.2.13a6.53 6.53 0 0 0-1.84 1.76 1 1 0 0 0 .25 1.4 1 1 0 0 0 1.4-.25c.33-.49.76-.9 1.27-1.22l.2-.13c2.2-1.4 3.8-3.57 4.49-6.1ZM2 14.01h4v14H2Zm-2 0v14c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V14a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2z`],name:`thumbs-up`},pa={icon:[32,32,`M18.05 26.89a1.5 1.5 0 1 0 2.9-.8l-.29-1.02a13.66 13.66 0 0 0-1.54-3.56 1 1 0 0 1 .85-1.52H28a2 2 0 0 0 1.07-3.69 1 1 0 0 1-.33-1.33 2 2 0 0 0-.82-2.76 1 1 0 0 1-.33-1.5 1.99 1.99 0 0 0-.96-3.12 1 1 0 0 1-.67-1.16A2 2 0 0 0 24 4h-5.6c-.98 0-1.94.3-2.77.84l-2.4 1.6c-.57.38-1.04.86-1.4 1.41a1 1 0 0 1-1.67-1.1 7.03 7.03 0 0 1 1.95-1.97l2.4-1.6A6.98 6.98 0 0 1 18.4 2H24a4 4 0 0 1 4 4v.04a4 4 0 0 1 1.7 5 3.99 3.99 0 0 1 1.13 4.13A3.99 3.99 0 0 1 28 22h-6.35c.39.81.7 1.66.94 2.55l.28 1.03a3.5 3.5 0 0 1-6.75 1.84l-.28-1.03a8.5 8.5 0 0 0-3.64-4.93l-.2-.13a6.52 6.52 0 0 1-1.84-1.76 1 1 0 0 1 .25-1.4 1 1 0 0 1 1.4.26c.33.48.76.9 1.27 1.22l.2.12c2.2 1.4 3.8 3.57 4.49 6.1zM2 21.99h4V8H2Zm-2 0V8c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2z`],name:`thumbs-down`},ma=`:host{box-sizing:border-box;display:block;container-type:inline-size}.answer{width:100%;display:block}.chart-actions-bar{justify-content:space-between;align-items:center;gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));padding-block:var(--luzmo-interactive-viz-item-actions-padding-block,var(--interactive-viz-item-actions-padding-block));flex-wrap:nowrap;margin-block-start:var(--luzmo-interactive-viz-item-actions-margin-block-start,var(--interactive-viz-item-actions-margin-block-start));display:flex}.chart-actions-primary{gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));flex-wrap:wrap;flex:1;align-items:center;min-width:0;display:flex}.ranking-content{gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-3);flex-direction:column;display:flex}.ranking-row{gap:var(--luzmo-spacing-3);align-items:center;display:flex}.ranking-number{width:4rem}.icon-flipped{transform:scaleY(-1)}.chart-container{border-radius:var(--luzmo-interactive-viz-item-chart-border-radius,var(--interactive-viz-item-chart-border-radius));height:var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height));overflow:hidden}.chart-container luzmo-embed-viz-item{width:100%;height:100%;display:block}.feedback-row{padding-block:var(--luzmo-interactive-viz-item-feedback-padding-block,var(--interactive-viz-item-feedback-padding-block));justify-content:space-between;align-items:center;display:flex}.rating-btn-positive{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.rating-btn-negative{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.config-toggle{--luzmo-action-button-border-radius:32px;margin-inline-start:auto}.sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.config-panel{border:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));border-radius:var(--luzmo-interactive-viz-item-config-panel-border-radius,var(--interactive-viz-item-config-panel-border-radius));padding:var(--luzmo-interactive-viz-item-config-panel-padding,var(--interactive-viz-item-config-panel-padding));background:var(--luzmo-interactive-viz-item-config-panel-background,var(--interactive-viz-item-config-panel-background));margin-block-start:var(--luzmo-spacing-2)}.config-panel luzmo-tab-panel[selected]{padding-block-start:var(--luzmo-spacing-4);display:block}.config-panel luzmo-item-option-panel,.config-panel luzmo-item-slot-picker-panel,.config-panel luzmo-filters{width:100%;max-height:15rem;scrollbar-width:thin;scrollbar-color:var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color)) transparent;padding-inline-end:var(--luzmo-spacing-3);overflow-y:auto}.edit-grid{min-height:12.5rem;display:flex}.edit-column{gap:var(--luzmo-spacing-3);flex-direction:column;display:flex}.edit-column:first-child{flex-shrink:0;max-width:15rem}.edit-column-filters{border-inline-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));flex:1;min-width:18.75rem;padding-inline-start:var(--luzmo-spacing-5)}@container (width<=520px){.edit-grid{flex-direction:column}.edit-column,.edit-column:first-child{width:100%;min-width:0;max-width:100%}.edit-column-filters{border-inline-start:none;border-block-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));min-width:0;margin-block-start:var(--luzmo-spacing-3);padding-block-start:var(--luzmo-spacing-4);padding-inline-start:0}}@container (width<=768px){.chart-container{height:calc(var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height)) - 2.5rem)}}:host{--interactive-viz-item-actions-gap:var(--luzmo-spacing-3);--interactive-viz-item-actions-padding-block:var(--luzmo-spacing-3);--interactive-viz-item-actions-margin-block-start:var(--luzmo-spacing-5);--interactive-viz-item-chart-height:20rem;--interactive-viz-item-chart-border-radius:var(--luzmo-border-radius);--interactive-viz-item-feedback-padding-block:var(--luzmo-spacing-4);--interactive-viz-item-config-panel-padding:var(--luzmo-spacing-5);--interactive-viz-item-config-panel-border-color:var(--luzmo-border-color);--interactive-viz-item-config-panel-border-radius:var(--luzmo-border-radius);--interactive-viz-item-config-panel-background:var(--luzmo-background-color);--interactive-viz-item-rating-positive-color:var(--luzmo-positive-color,#12855a);--interactive-viz-item-rating-negative-color:var(--luzmo-negative-color,#ca221c);--interactive-viz-item-rating-selected-background:var(--luzmo-background-color-focus,#0000000f)}:host([size=s]){--interactive-viz-item-chart-height:17.5rem}:host([size=l]){--interactive-viz-item-chart-height:22rem}:host([size=xl]){--interactive-viz-item-chart-height:24rem}`,ha=function(e){return e.Top=`top`,e.Bottom=`bottom`,e}({}),ga=function(e){return e.Asc=`asc`,e.Desc=`desc`,e}({}),_a=function(e){return e.Measure=`measure`,e.Category=`category`,e}({}),va=5,ya=Array.isArray;function ba(e){return typeof e==`string`}function xa(e){let t={...e};return!t.datasetId&&t.set&&(t.datasetId=t.set),!t.set&&t.datasetId&&(t.set=t.datasetId),!t.columnId&&t.column&&(t.columnId=t.column),!t.column&&t.columnId&&(t.column=t.columnId),!t.formulaId&&t.formula&&(t.formulaId=t.formula),!t.formula&&t.formulaId&&(t.formula=t.formulaId),t}function Sa(e){return ya(e)?e:Object.entries(e).map(([e,t])=>({name:e,content:ya(t)?t:[]}))}function Ca(e){let t=new Set;for(let n of e)for(let e of n.content){let n=e.datasetId??e.set;ba(n)&&t.add(n)}return[...t]}function wa(e){let t=Sa(e.slots??[]),n=e.options??{},r=n.interactivity;return{type:e.type,options:{...n,interactivity:{...r,scheduledExport:!1}},slots:t.map(e=>({...e,content:ya(e.content)?e.content.map(e=>xa(e)):[]})),filters:e.filters}}function Ta(e,t){return{...e,options:{...e.options,theme:{...e.options.theme,...t}}}}function Ea(e){let t=e.find(e=>e.name===`measure`||e.name===`measures`);if(t&&t.content.length>1)return!0;let n=e.find(e=>e.name===`legend`);return n?n.content.length>0:!1}function Da(e){let t=[],n=e.options;switch(e.type){case`area-chart`:case`bar-chart`:case`column-chart`:if(t.push({type:`rankingPicker`,mutationType:`rankAndSort`,ranking:n.ranking??{active:!1,number:5,direction:ha.Top},sort:n.sort??{direction:ga.Desc,by:_a.Measure},importance:100}),Ea(e.slots)){let r=e.type===`area-chart`,i=r?[{key:`stacked`,label:`Stacked`},{key:`unstacked`,label:`Unstacked`},{key:`100`,label:`100%`},{key:`stream`,label:`Stream`}]:[{key:`grouped`,label:`Grouped`},{key:`stacked`,label:`Stacked`},{key:`100`,label:`100%`}],a=r?`stacked`:`grouped`;t.push({type:`optionDropdown`,mutationType:`mode`,values:i,currentValue:n.mode??a,importance:90})}break;case`donut-chart`:{let e=n.display??{};t.push({type:`optionDropdown`,mutationType:`donutLabelDisplay`,values:[{key:`withLegend`,label:`With legend`},{key:`withLabels`,label:`With labels`}],currentValue:e.categoryLabels===!0?`withLabels`:`withLegend`,importance:90});break}case`bubble-chart`:{let e=n.display??{};t.push({type:`optionDropdown`,mutationType:`bubbleValues`,values:[{key:`none`,label:`No values`},{key:`absolute`,label:`Absolute`},{key:`percentage`,label:`Percentage`}],currentValue:e.bubbleValues??e.values??`none`,importance:100});break}}return t.sort((e,t)=>t.importance-e.importance)}function Oa(e,t,n){let r=e.options;switch(t){case`mode`:return{...e,options:{...r,mode:n}};case`donutLabelDisplay`:{let t={...r.display??{}};return n===`withLabels`?(t.legend=!1,t.categoryLabels=!0):(t.legend=!0,t.categoryLabels=!1),{...e,options:{...r,display:t}}}case`bubbleValues`:{let t={...r.display??{}};return t.bubbleLabels=t.bubbleLabels!==!1,t.bubbleValues=n,{...e,options:{...r,display:t}}}default:return e}}function ka(e,t){switch(t.type){case`slots`:return{...e,slots:t.slotsContents};case`options`:return{...e,options:t.options};case`filters`:return{...e,filters:t.filters};case`chartAction`:return Oa(e,t.actionType,t.key);case`rankAndSort`:return{...e,options:{...e.options,ranking:t.ranking,sort:t.sort}};case`fullReplace`:return t.chart;default:return e}}var Aa=[`luzmo-filters`,`luzmo-item-option-panel`,`luzmo-item-slot-picker-panel`],ja=s(()=>Promise.all([import(`./chunks/filters-C1yU7w2V.js`),import(`./chunks/item-option-panel-CyE_83Hf.js`),import(`./chunks/item-slot-picker-panel-Bqmx51Yb.js`)])),Ma=ja.load,Na=()=>ja.isLoaded()||Aa.every(e=>customElements.get(e)!==void 0),Pa=0,$=class extends t(i(a,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.chart=null,this.feedback=null,this.messageId=``,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.contentLanguage=``,this.hideActions=!1,this.hideFeedback=!1,this.hideConfigPanel=!1,this._configPanelOpen=!1,this._configPanelPending=!1,this._configPanelLoadFailed=!1,this._rankingTriggerId=`interactive-viz-item-ranking-${++Pa}`,this._handleSlotsChanged=e=>{this.chart&&this._emitChart({...this.chart,slots:e.detail.slotsContents})},this._handleFiltersChanged=e=>{this.chart&&this._emitChart({...this.chart,filters:e.detail.filters})},this._handleOptionsChanged=e=>{if(!this.chart)return;let t=e.detail.options;if(!t)return;let n=this.chart.options.theme??{};this._emitChart({...this.chart,options:{...t,theme:{...n}}})}}static get styles(){return[g(ma)]}get _effectiveContentLanguage(){return this.contentLanguage||this.language}_dispatch(e,t){let n=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(n)}get _chartActions(){return this.chart?Da(wa(this.chart)):[]}get _rating(){return this.feedback?.rating??0}get _canShowConfigPanel(){return!!this.chart&&!this.hideConfigPanel}async _toggleConfigPanel(){if(this._configPanelLoadFailed=!1,this._configPanelOpen){this._configPanelOpen=!1;return}if(!this._configPanelPending){if(!Na()){this._configPanelPending=!0;try{await Ma()}catch(e){console.warn(`Failed to load the chart configuration panel:`,e),this._configPanelLoadFailed=!0;return}finally{this._configPanelPending=!1}}!this.isConnected||!this._canShowConfigPanel||(this._configPanelOpen=!0)}}_emitOptions(e){this._dispatch(`luzmo-chart-options-changed`,{options:e})}_emitChart(e){this._dispatch(`luzmo-chart-changed`,{chart:e})}_handleDropdownChange(e,t){if(!this.chart)return;t.stopPropagation();let n=t.detail,r=typeof n==`string`?n:n?.value??t.target?.value;if(!r)return;let i=ka(wa(this.chart),{type:`chartAction`,actionType:e.mutationType,key:r});this._emitOptions(i.options)}_currentRanking(e){return e.ranking??{active:!1,number:5,direction:ha.Top}}_currentSort(e){return e.sort??{direction:ga.Desc,by:_a.Measure}}_emitRankAndSort(e,t){this.chart&&this._emitOptions({...this.chart.options,ranking:e,sort:t})}_renderOptionDropdown(e){let t=e.values??[],n=e.currentValue||t[0]?.key||``;return u`
|
|
22
|
+
import{n as e,t}from"./chunks/localized-mixin-YSDMfLKU.js";import{n}from"./chunks/lit-localize-CIGP-NUw.js";import"./chunks/embed-EnSdYTW8.js";import{t as r}from"./chunks/luzmoAlignLeft-HA-XKPHy.js";import{n as i,r as a,t as o}from"./chunks/base-Cgmw1Vq_.js";import{t as s}from"./chunks/create-lazy-loader-DC0rJePE.js";import{html as c,nothing as l,property as u,state as d,unsafeCSS as f}from"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/lit.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/action-button.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/action-group.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/field-label.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/icon.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/number-field.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/overlay.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/picker.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/popover.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/progress-circle.js";import"https://cdn.jsdelivr.net/npm/@luzmo/lucero@2.4.0/standalone/tabs.js";var p={icon:[32,32,`M16 0a16 16 0 1 0 16 16A16 16 0 0 0 16 0m0 7q1.4 0 1.5 1.5c0 2-3 2-3 0 0-1 .8-1.5 1.5-1.5m0 5q.9 0 1 1v10c0 1.3-2 1.3-2 0V13q.1-1 1-1`],name:`info-circle`},m={icon:[32,32,`M18.05 5.11a1.5 1.5 0 1 1 2.9.8l-.29 1.02a13.67 13.67 0 0 1-1.54 3.56 1 1 0 0 0 .85 1.52H28a2 2 0 0 1 1.07 3.7 1 1 0 0 0-.33 1.32 2 2 0 0 1-.82 2.76 1 1 0 0 0-.33 1.5 1.99 1.99 0 0 1-.96 3.12 1 1 0 0 0-.67 1.17A2 2 0 0 1 24 28h-5.6c-.98 0-1.94-.3-2.77-.84l-2.4-1.6a4.94 4.94 0 0 1-1.4-1.42 1 1 0 0 0-1.4-.29 1 1 0 0 0-.28 1.4c.5.76 1.17 1.43 1.96 1.97l2.4 1.6a6.98 6.98 0 0 0 3.89 1.18H24a4 4 0 0 0 4-4v-.04a4 4 0 0 0 1.7-5 4 4 0 0 0 1.13-4.13A4 4 0 0 0 28 10h-6.35c.39-.82.7-1.67.94-2.56l.29-1.02a3.51 3.51 0 0 0-6.76-1.85l-.28 1.03a8.5 8.5 0 0 1-3.64 4.93l-.2.13a6.53 6.53 0 0 0-1.84 1.76 1 1 0 0 0 .25 1.4 1 1 0 0 0 1.4-.25c.33-.49.76-.9 1.27-1.22l.2-.13c2.2-1.4 3.8-3.57 4.49-6.1ZM2 14.01h4v14H2Zm-2 0v14c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V14a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2z`],name:`thumbs-up`},h={icon:[32,32,`M18.05 26.89a1.5 1.5 0 1 0 2.9-.8l-.29-1.02a13.66 13.66 0 0 0-1.54-3.56 1 1 0 0 1 .85-1.52H28a2 2 0 0 0 1.07-3.69 1 1 0 0 1-.33-1.33 2 2 0 0 0-.82-2.76 1 1 0 0 1-.33-1.5 1.99 1.99 0 0 0-.96-3.12 1 1 0 0 1-.67-1.16A2 2 0 0 0 24 4h-5.6c-.98 0-1.94.3-2.77.84l-2.4 1.6c-.57.38-1.04.86-1.4 1.41a1 1 0 0 1-1.67-1.1 7.03 7.03 0 0 1 1.95-1.97l2.4-1.6A6.98 6.98 0 0 1 18.4 2H24a4 4 0 0 1 4 4v.04a4 4 0 0 1 1.7 5 3.99 3.99 0 0 1 1.13 4.13A3.99 3.99 0 0 1 28 22h-6.35c.39.81.7 1.66.94 2.55l.28 1.03a3.5 3.5 0 0 1-6.75 1.84l-.28-1.03a8.5 8.5 0 0 0-3.64-4.93l-.2-.13a6.52 6.52 0 0 1-1.84-1.76 1 1 0 0 1 .25-1.4 1 1 0 0 1 1.4.26c.33.48.76.9 1.27 1.22l.2.12c2.2 1.4 3.8 3.57 4.49 6.1zM2 21.99h4V8H2Zm-2 0V8c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2z`],name:`thumbs-down`},g=`:host{box-sizing:border-box;display:block;container-type:inline-size}.answer{width:100%;display:block}.chart-actions-bar{justify-content:space-between;align-items:center;gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));padding-block:var(--luzmo-interactive-viz-item-actions-padding-block,var(--interactive-viz-item-actions-padding-block));flex-wrap:nowrap;margin-block-start:var(--luzmo-interactive-viz-item-actions-margin-block-start,var(--interactive-viz-item-actions-margin-block-start));display:flex}.chart-actions-primary{gap:var(--luzmo-interactive-viz-item-actions-gap,var(--interactive-viz-item-actions-gap));flex-wrap:wrap;flex:1;align-items:center;min-width:0;display:flex}.ranking-content{gap:var(--luzmo-spacing-3);padding:var(--luzmo-spacing-3);flex-direction:column;display:flex}.ranking-row{gap:var(--luzmo-spacing-3);align-items:center;display:flex}.ranking-number{width:4rem}.icon-flipped{transform:scaleY(-1)}.chart-container{border-radius:var(--luzmo-interactive-viz-item-chart-border-radius,var(--interactive-viz-item-chart-border-radius));height:var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height));overflow:hidden}.chart-container luzmo-embed-viz-item{width:100%;height:100%;display:block}.feedback-row{padding-block:var(--luzmo-interactive-viz-item-feedback-padding-block,var(--interactive-viz-item-feedback-padding-block));justify-content:space-between;align-items:center;display:flex}.rating-btn-positive{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-positive-color,var(--interactive-viz-item-rating-positive-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.rating-btn-negative{--luzmo-action-button-content-color-default-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-hover-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-down-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-content-color-focus-selected:var(--luzmo-interactive-viz-item-rating-negative-color,var(--interactive-viz-item-rating-negative-color));--luzmo-action-button-background-color-default-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-hover-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-down-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background));--luzmo-action-button-background-color-focus-selected:var(--luzmo-interactive-viz-item-rating-selected-background,var(--interactive-viz-item-rating-selected-background))}.config-toggle{--luzmo-action-button-border-radius:32px;margin-inline-start:auto}.sr-only{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.config-panel{border:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));border-radius:var(--luzmo-interactive-viz-item-config-panel-border-radius,var(--interactive-viz-item-config-panel-border-radius));padding:var(--luzmo-interactive-viz-item-config-panel-padding,var(--interactive-viz-item-config-panel-padding));background:var(--luzmo-interactive-viz-item-config-panel-background,var(--interactive-viz-item-config-panel-background));margin-block-start:var(--luzmo-spacing-2)}.config-panel luzmo-tab-panel[selected]{padding-block-start:var(--luzmo-spacing-4);display:block}.config-panel luzmo-item-option-panel,.config-panel luzmo-item-slot-picker-panel,.config-panel luzmo-filters{width:100%;max-height:15rem;scrollbar-width:thin;scrollbar-color:var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color)) transparent;padding-inline-end:var(--luzmo-spacing-3);overflow-y:auto}.edit-grid{min-height:12.5rem;display:flex}.edit-column{gap:var(--luzmo-spacing-3);flex-direction:column;display:flex}.edit-column:first-child{flex-shrink:0;max-width:15rem}.edit-column-filters{border-inline-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));flex:1;min-width:18.75rem;padding-inline-start:var(--luzmo-spacing-5)}@container (width<=520px){.edit-grid{flex-direction:column}.edit-column,.edit-column:first-child{width:100%;min-width:0;max-width:100%}.edit-column-filters{border-inline-start:none;border-block-start:1px solid var(--luzmo-interactive-viz-item-config-panel-border-color,var(--interactive-viz-item-config-panel-border-color));min-width:0;margin-block-start:var(--luzmo-spacing-3);padding-block-start:var(--luzmo-spacing-4);padding-inline-start:0}}@container (width<=768px){.chart-container{height:calc(var(--luzmo-interactive-viz-item-chart-height,var(--interactive-viz-item-chart-height)) - 2.5rem)}}:host{--interactive-viz-item-actions-gap:var(--luzmo-spacing-3);--interactive-viz-item-actions-padding-block:var(--luzmo-spacing-3);--interactive-viz-item-actions-margin-block-start:var(--luzmo-spacing-5);--interactive-viz-item-chart-height:20rem;--interactive-viz-item-chart-border-radius:var(--luzmo-border-radius);--interactive-viz-item-feedback-padding-block:var(--luzmo-spacing-4);--interactive-viz-item-config-panel-padding:var(--luzmo-spacing-5);--interactive-viz-item-config-panel-border-color:var(--luzmo-border-color);--interactive-viz-item-config-panel-border-radius:var(--luzmo-border-radius);--interactive-viz-item-config-panel-background:var(--luzmo-background-color);--interactive-viz-item-rating-positive-color:var(--luzmo-positive-color,#12855a);--interactive-viz-item-rating-negative-color:var(--luzmo-negative-color,#ca221c);--interactive-viz-item-rating-selected-background:var(--luzmo-background-color-focus,#0000000f)}:host([size=s]){--interactive-viz-item-chart-height:17.5rem}:host([size=l]){--interactive-viz-item-chart-height:22rem}:host([size=xl]){--interactive-viz-item-chart-height:24rem}`,_=function(e){return e.Top=`top`,e.Bottom=`bottom`,e}({}),v=function(e){return e.Asc=`asc`,e.Desc=`desc`,e}({}),y=function(e){return e.Measure=`measure`,e.Category=`category`,e}({}),b=5,x=Array.isArray;function S(e){return typeof e==`string`}function C(e){let t={...e};return!t.datasetId&&t.set&&(t.datasetId=t.set),!t.set&&t.datasetId&&(t.set=t.datasetId),!t.columnId&&t.column&&(t.columnId=t.column),!t.column&&t.columnId&&(t.column=t.columnId),!t.formulaId&&t.formula&&(t.formulaId=t.formula),!t.formula&&t.formulaId&&(t.formula=t.formulaId),t}function w(e){return x(e)?e:Object.entries(e).map(([e,t])=>({name:e,content:x(t)?t:[]}))}function T(e){let t=new Set;for(let n of e)for(let e of n.content){let n=e.datasetId??e.set;S(n)&&t.add(n)}return[...t]}function E(e){let t=w(e.slots??[]),n=e.options??{},r=n.interactivity;return{type:e.type,options:{...n,interactivity:{...r,scheduledExport:!1}},slots:t.map(e=>({...e,content:x(e.content)?e.content.map(e=>C(e)):[]})),filters:e.filters}}function D(e,t){return{...e,options:{...e.options,theme:{...e.options.theme,...t}}}}function O(e){let t=e.find(e=>e.name===`measure`||e.name===`measures`);if(t&&t.content.length>1)return!0;let n=e.find(e=>e.name===`legend`);return n?n.content.length>0:!1}function k(e){let t=[],n=e.options;switch(e.type){case`area-chart`:case`bar-chart`:case`column-chart`:if(t.push({type:`rankingPicker`,mutationType:`rankAndSort`,ranking:n.ranking??{active:!1,number:5,direction:_.Top},sort:n.sort??{direction:v.Desc,by:y.Measure},importance:100}),O(e.slots)){let r=e.type===`area-chart`,i=r?[{key:`stacked`,label:`Stacked`},{key:`unstacked`,label:`Unstacked`},{key:`100`,label:`100%`},{key:`stream`,label:`Stream`}]:[{key:`grouped`,label:`Grouped`},{key:`stacked`,label:`Stacked`},{key:`100`,label:`100%`}],a=r?`stacked`:`grouped`;t.push({type:`optionDropdown`,mutationType:`mode`,values:i,currentValue:n.mode??a,importance:90})}break;case`donut-chart`:{let e=n.display??{};t.push({type:`optionDropdown`,mutationType:`donutLabelDisplay`,values:[{key:`withLegend`,label:`With legend`},{key:`withLabels`,label:`With labels`}],currentValue:e.categoryLabels===!0?`withLabels`:`withLegend`,importance:90});break}case`bubble-chart`:{let e=n.display??{};t.push({type:`optionDropdown`,mutationType:`bubbleValues`,values:[{key:`none`,label:`No values`},{key:`absolute`,label:`Absolute`},{key:`percentage`,label:`Percentage`}],currentValue:e.bubbleValues??e.values??`none`,importance:100});break}}return t.sort((e,t)=>t.importance-e.importance)}function A(e,t,n){let r=e.options;switch(t){case`mode`:return{...e,options:{...r,mode:n}};case`donutLabelDisplay`:{let t={...r.display??{}};return n===`withLabels`?(t.legend=!1,t.categoryLabels=!0):(t.legend=!0,t.categoryLabels=!1),{...e,options:{...r,display:t}}}case`bubbleValues`:{let t={...r.display??{}};return t.bubbleLabels=t.bubbleLabels!==!1,t.bubbleValues=n,{...e,options:{...r,display:t}}}default:return e}}function j(e,t){switch(t.type){case`slots`:return{...e,slots:t.slotsContents};case`options`:return{...e,options:t.options};case`filters`:return{...e,filters:t.filters};case`chartAction`:return A(e,t.actionType,t.key);case`rankAndSort`:return{...e,options:{...e.options,ranking:t.ranking,sort:t.sort}};case`fullReplace`:return t.chart;default:return e}}var M=[`luzmo-filters`,`luzmo-item-option-panel`,`luzmo-item-slot-picker-panel`],N=s(()=>Promise.all([import(`./chunks/filters-CTsIpQ2T.js`),import(`./chunks/item-option-panel-CpyguQjh.js`),import(`./chunks/item-slot-picker-panel-B_7VXYPs.js`)])),P=N.load,F=()=>N.isLoaded()||M.every(e=>customElements.get(e)!==void 0),I=0,L=class extends t(i(a,{validSizes:Object.values(o)})){constructor(...e){super(...e),this.chart=null,this.feedback=null,this.messageId=``,this.authKey=``,this.authToken=``,this.apiUrl=`https://api.luzmo.com`,this.appServer=`https://app.luzmo.com`,this.contentLanguage=``,this.hideActions=!1,this.hideFeedback=!1,this.hideConfigPanel=!1,this._configPanelOpen=!1,this._configPanelPending=!1,this._configPanelLoadFailed=!1,this._rankingTriggerId=`interactive-viz-item-ranking-${++I}`,this._handleSlotsChanged=e=>{this.chart&&this._emitChart({...this.chart,slots:e.detail.slotsContents})},this._handleFiltersChanged=e=>{this.chart&&this._emitChart({...this.chart,filters:e.detail.filters})},this._handleOptionsChanged=e=>{if(!this.chart)return;let t=e.detail.options;if(!t)return;let n=this.chart.options.theme??{};this._emitChart({...this.chart,options:{...t,theme:{...n}}})}}static get styles(){return[f(g)]}get _effectiveContentLanguage(){return this.contentLanguage||this.language}_dispatch(e,t){let n=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(n)}get _chartActions(){return this.chart?k(E(this.chart)):[]}get _rating(){return this.feedback?.rating??0}get _canShowConfigPanel(){return!!this.chart&&!this.hideConfigPanel}async _toggleConfigPanel(){if(this._configPanelLoadFailed=!1,this._configPanelOpen){this._configPanelOpen=!1;return}if(!this._configPanelPending){if(!F()){this._configPanelPending=!0;try{await P()}catch(e){console.warn(`Failed to load the chart configuration panel:`,e),this._configPanelLoadFailed=!0;return}finally{this._configPanelPending=!1}}!this.isConnected||!this._canShowConfigPanel||(this._configPanelOpen=!0)}}_emitOptions(e){this._dispatch(`luzmo-chart-options-changed`,{options:e})}_emitChart(e){this._dispatch(`luzmo-chart-changed`,{chart:e})}_handleDropdownChange(e,t){if(!this.chart)return;t.stopPropagation();let n=t.detail,r=typeof n==`string`?n:n?.value??t.target?.value;if(!r)return;let i=j(E(this.chart),{type:`chartAction`,actionType:e.mutationType,key:r});this._emitOptions(i.options)}_currentRanking(e){return e.ranking??{active:!1,number:5,direction:_.Top}}_currentSort(e){return e.sort??{direction:v.Desc,by:y.Measure}}_emitRankAndSort(e,t){this.chart&&this._emitOptions({...this.chart.options,ranking:e,sort:t})}_renderOptionDropdown(e){let t=e.values??[],n=e.currentValue||t[0]?.key||``;return c`
|
|
249
23
|
<luzmo-picker
|
|
250
24
|
size=${this.size}
|
|
251
25
|
variant="highlight"
|
|
252
26
|
value=${n}
|
|
253
27
|
@change=${t=>this._handleDropdownChange(e,t)}
|
|
254
28
|
>
|
|
255
|
-
${t.map(e=>
|
|
29
|
+
${t.map(e=>c`<luzmo-menu-item value=${e.key}>${e.label}</luzmo-menu-item>`)}
|
|
256
30
|
</luzmo-picker>
|
|
257
|
-
`}_renderRankingPicker(e){let t=this._currentRanking(e),i=this._currentSort(e);if(!t.active)return
|
|
31
|
+
`}_renderRankingPicker(e){let t=this._currentRanking(e),i=this._currentSort(e);if(!t.active)return c`
|
|
258
32
|
<luzmo-action-button
|
|
259
33
|
size=${this.size}
|
|
260
|
-
@click=${()=>this._emitRankAndSort({active:!0,number:5,direction:
|
|
34
|
+
@click=${()=>this._emitRankAndSort({active:!0,number:5,direction:_.Top},i)}
|
|
261
35
|
>
|
|
262
36
|
<luzmo-icon slot="icon" size="xs" .icon=${r}></luzmo-icon>
|
|
263
37
|
${n(`Show top 5`,{desc:`Label to activate top-N ranking on a chart`})}
|
|
264
38
|
</luzmo-action-button>
|
|
265
|
-
`;let a=t.direction===
|
|
39
|
+
`;let a=t.direction===_.Bottom?n(`Bottom`,{desc:`Ranking direction: keep the lowest values`}):n(`Top`,{desc:`Ranking direction: keep the highest values`});return c`
|
|
266
40
|
<luzmo-action-button size=${this.size} id=${this._rankingTriggerId}>
|
|
267
41
|
<luzmo-icon slot="icon" size="xs" .icon=${r}></luzmo-icon>
|
|
268
42
|
${a} ${t.number||5}
|
|
@@ -338,19 +112,19 @@ ${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.document
|
|
|
338
112
|
</div>
|
|
339
113
|
</luzmo-popover>
|
|
340
114
|
</luzmo-overlay>
|
|
341
|
-
`}_handleDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort({...this._currentRanking(e),direction:n[0]},this._currentSort(e))}_handleNumberChange(e,t){t.stopPropagation();let n=t.target?.value,r=typeof n==`number`?n:Number.parseInt(String(n),10);!Number.isNaN(r)&&r>=1&&this._emitRankAndSort({...this._currentRanking(e),number:r},this._currentSort(e))}_handleSortByChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),by:n[0]})}_handleSortDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),direction:n[0]})}_renderActions(){return this.hideActions?
|
|
115
|
+
`}_handleDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort({...this._currentRanking(e),direction:n[0]},this._currentSort(e))}_handleNumberChange(e,t){t.stopPropagation();let n=t.target?.value,r=typeof n==`number`?n:Number.parseInt(String(n),10);!Number.isNaN(r)&&r>=1&&this._emitRankAndSort({...this._currentRanking(e),number:r},this._currentSort(e))}_handleSortByChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),by:n[0]})}_handleSortDirectionChange(e,t){t.stopPropagation();let n=t.target?.selected;n?.length&&this._emitRankAndSort(this._currentRanking(e),{...this._currentSort(e),direction:n[0]})}_renderActions(){return this.hideActions?c`
|
|
342
116
|
<div class="chart-actions-bar">
|
|
343
117
|
<div class="chart-actions-primary"></div>
|
|
344
118
|
<slot name="chart-actions-extra"></slot>
|
|
345
119
|
</div>
|
|
346
|
-
`:
|
|
120
|
+
`:c`
|
|
347
121
|
<div class="chart-actions-bar">
|
|
348
122
|
<div class="chart-actions-primary">
|
|
349
123
|
${this._chartActions.map(e=>e.type===`optionDropdown`?this._renderOptionDropdown(e):this._renderRankingPicker(e))}
|
|
350
124
|
</div>
|
|
351
125
|
<slot name="chart-actions-extra"></slot>
|
|
352
126
|
</div>
|
|
353
|
-
`}_renderChart(){if(!this.chart)return
|
|
127
|
+
`}_renderChart(){if(!this.chart)return l;let e=E(this.chart);return c`
|
|
354
128
|
<div class="chart-container" part="chart-container">
|
|
355
129
|
<luzmo-embed-viz-item
|
|
356
130
|
.type=${e.type}
|
|
@@ -365,9 +139,9 @@ ${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.document
|
|
|
365
139
|
.canFilter=${!1}
|
|
366
140
|
></luzmo-embed-viz-item>
|
|
367
141
|
</div>
|
|
368
|
-
`}_renderFeedback(){let e=!this.hideFeedback&&!!this.messageId,t=this._canShowConfigPanel,r=n(`Loading`,{desc:`Loading spinner label`});return!e&&!t?
|
|
142
|
+
`}_renderFeedback(){let e=!this.hideFeedback&&!!this.messageId,t=this._canShowConfigPanel,r=n(`Loading`,{desc:`Loading spinner label`});return!e&&!t?l:c`
|
|
369
143
|
<div class="feedback-row">
|
|
370
|
-
${e?
|
|
144
|
+
${e?c`
|
|
371
145
|
<luzmo-action-group quiet size=${this.size}>
|
|
372
146
|
<luzmo-action-button
|
|
373
147
|
class="rating-btn-positive"
|
|
@@ -377,7 +151,7 @@ ${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.document
|
|
|
377
151
|
?selected=${this._rating===1}
|
|
378
152
|
@click=${()=>this._toggleRating(!0)}
|
|
379
153
|
>
|
|
380
|
-
<luzmo-icon slot="icon" size="s" .icon=${
|
|
154
|
+
<luzmo-icon slot="icon" size="s" .icon=${m}></luzmo-icon>
|
|
381
155
|
</luzmo-action-button>
|
|
382
156
|
<luzmo-action-button
|
|
383
157
|
class="rating-btn-negative"
|
|
@@ -387,11 +161,11 @@ ${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.document
|
|
|
387
161
|
?selected=${this._rating===-1}
|
|
388
162
|
@click=${()=>this._toggleRating(!1)}
|
|
389
163
|
>
|
|
390
|
-
<luzmo-icon slot="icon" size="s" .icon=${
|
|
164
|
+
<luzmo-icon slot="icon" size="s" .icon=${h}></luzmo-icon>
|
|
391
165
|
</luzmo-action-button>
|
|
392
166
|
</luzmo-action-group>
|
|
393
|
-
`:
|
|
394
|
-
${t?
|
|
167
|
+
`:l}
|
|
168
|
+
${t?c`
|
|
395
169
|
<luzmo-action-button
|
|
396
170
|
class="config-toggle"
|
|
397
171
|
size=${this.size}
|
|
@@ -401,13 +175,13 @@ ${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.document
|
|
|
401
175
|
aria-label=${this._configPanelPending?r:n(`Configure chart`,{desc:`Accessible label for the chart config toggle`})}
|
|
402
176
|
@click=${()=>this._toggleConfigPanel()}
|
|
403
177
|
>
|
|
404
|
-
${this._configPanelPending?
|
|
178
|
+
${this._configPanelPending?c`<luzmo-progress-circle slot="icon" size="s" indeterminate .label=${r}></luzmo-progress-circle>`:c`<luzmo-icon slot="icon" size="s" .icon=${p}></luzmo-icon>`}
|
|
405
179
|
</luzmo-action-button>
|
|
406
180
|
<span class="sr-only" role="status" aria-live="polite">${this._configPanelPending?r:``}</span>
|
|
407
181
|
<span class="sr-only" role="alert">${this._configPanelLoadFailed?n(`Failed to load the chart configuration. Please try again.`,{desc:`Error message when the chart config panel fails to load`}):``}</span>
|
|
408
|
-
`:
|
|
182
|
+
`:l}
|
|
409
183
|
</div>
|
|
410
|
-
`}_toggleRating(e){let t=e?1:-1,n=this._rating===t?0:t;this._dispatch(`luzmo-feedback-changed`,{rating:n,comment:this.feedback?.comment})}_renderConfigPanel(){if(!this.chart||this.hideConfigPanel||!this._configPanelOpen)return
|
|
184
|
+
`}_toggleRating(e){let t=e?1:-1,n=this._rating===t?0:t;this._dispatch(`luzmo-feedback-changed`,{rating:n,comment:this.feedback?.comment})}_renderConfigPanel(){if(!this.chart||this.hideConfigPanel||!this._configPanelOpen)return l;let e=this.chart,t=w(e.slots??[]),r=T(t),i=e.options.theme??{};return c`
|
|
411
185
|
<div class="config-panel" part="config-panel">
|
|
412
186
|
<luzmo-tabs selected="data" size=${this.size}>
|
|
413
187
|
<luzmo-tab value="data">${n(`Data`,{desc:`Label for the data section`})}</luzmo-tab>
|
|
@@ -465,13 +239,13 @@ ${e}`,console.warn(n))},ee=e=>{let t=!1,n=``,r=(document.body||document.document
|
|
|
465
239
|
</luzmo-tab-panel>
|
|
466
240
|
</luzmo-tabs>
|
|
467
241
|
</div>
|
|
468
|
-
`}render(){return this.chart?
|
|
242
|
+
`}render(){return this.chart?c`
|
|
469
243
|
<div class="answer" part="container">
|
|
470
244
|
${this._renderActions()} ${this._renderChart()} ${this._renderFeedback()} ${this._renderConfigPanel()}
|
|
471
245
|
</div>
|
|
472
|
-
`:
|
|
246
|
+
`:c`
|
|
473
247
|
<div
|
|
474
248
|
class="answer"
|
|
475
249
|
part="container"
|
|
476
250
|
></div>
|
|
477
|
-
`}};e([
|
|
251
|
+
`}};e([u({type:Object})],L.prototype,`chart`,void 0),e([u({type:Object})],L.prototype,`feedback`,void 0),e([u({type:String,attribute:`message-id`})],L.prototype,`messageId`,void 0),e([u({type:String,attribute:`auth-key`})],L.prototype,`authKey`,void 0),e([u({type:String,attribute:`auth-token`})],L.prototype,`authToken`,void 0),e([u({type:String,attribute:`api-url`})],L.prototype,`apiUrl`,void 0),e([u({type:String,attribute:`app-server`})],L.prototype,`appServer`,void 0),e([u({type:String,attribute:`content-language`})],L.prototype,`contentLanguage`,void 0),e([u({type:Boolean,attribute:`hide-actions`,reflect:!0})],L.prototype,`hideActions`,void 0),e([u({type:Boolean,attribute:`hide-feedback`,reflect:!0})],L.prototype,`hideFeedback`,void 0),e([u({type:Boolean,attribute:`hide-config-panel`,reflect:!0})],L.prototype,`hideConfigPanel`,void 0),e([d()],L.prototype,`_configPanelOpen`,void 0),e([d()],L.prototype,`_configPanelPending`,void 0),e([d()],L.prototype,`_configPanelLoadFailed`,void 0),customElements.get(`luzmo-interactive-viz-item`)||customElements.define(`luzmo-interactive-viz-item`,L);export{b as DEFAULT_RANKING_NUMBER,L as LuzmoInteractiveVizItem,_ as RankingDirection,y as SortBy,v as SortDirection,j as applyChartMutation,k as calculateChartActions,w as convertSlotsToArray,T as getChartDatasetIds,D as mergeThemeIntoChart,E as normalizeChartConfig};
|