@nebula.js/sn-action-button 1.44.2 → 1.44.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  /*
2
- * @nebula.js/sn-action-button v1.44.2
2
+ * @nebula.js/sn-action-button v1.44.3
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-action-button"]=t(e.stardust)}(this,(function(e){"use strict";const t=e=>{if(void 0===e)return"";let t="";const o=document.createElement("div"),n=document.createTextNode(e);return o.appendChild(n),t=o.innerHTML,o.removeChild(n),t},o="http://",n="https://",a="mailto:",i=e=>e.startsWith(o)?o:e.startsWith(n)?n:e.startsWith(a)?a:o,r=e=>{let t=e;return e.startsWith(o)&&(t=e.slice(7)),e.startsWith(n)&&(t=e.slice(8)),t},l=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,s=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,c=e=>String(e).replace(s,"$1�$2").replace(l,encodeURI);function u(e){var t;let o,n,a;if(null!=e&&null!==(t=e.session)&&void 0!==t&&t.config){const{config:t}=e.session;o=new URL(t.url);const i=function(e){const t=String(e).split(e.host)[1].split("/");return"app"===t[1]?"":`/${t[1]}`}(o);return a="wss:"===o.protocol,n=a?"https://":"http://",n+o.host+i}}const p=(e,t)=>{e.replace(/^\.\.\//i,"/"),e=(e=e.replace(/"/g,'\\"')).replace(/'/g,"\\'");return e=`${u(t)}/`+("/"===e[0]?e.substr(1):e)},d=()=>{try{return window.self!==window.top}catch(e){return!0}},g=async()=>(await fetch("../api/v1/csrf-token")).headers.get("qlik-csrf-token"),b=async e=>{var t;const o=await fetch(`../api/v1/apps/${e}`),n=await o.json();return(null==n||null===(t=n.attributes)||void 0===t?void 0:t.spaceId)||"personal"},h=(e,t,o)=>{const n=e.get(t);return n===t?o:n},f=e=>h(e,"Object.ActionButton.Automation.DefaultAutomationMsg","Automation finished"),m=(e,t)=>{const o={message:f(t)};if(void 0!==e){if("object"==typeof e)return Array.isArray(e)?(null==e?void 0:e.length)>0?{message:e.join(" ")}:o:Object.keys(e).includes("message")?e:o;try{const t=JSON.parse(e);return Object.keys(t).includes("message")?t:o}catch(t){return""===e?o:"string"==typeof e||"number"==typeof e?{message:e}:o}}return o},v=async(e,t,o,n,a)=>{const i=await(async(e,t)=>(await fetch(`../api/v1/automations/${e}/runs/${t}`)).json())(e,t);switch(i.status){case"queued":case"running":case"not started":case"starting":return n>300?{ok:!1,message:h(o,"geo.findLocation.error.timeout","Timeout")}:setTimeout((()=>v(e,t,o,n+1,a)),2e3);case"finished":var r;return(null===(r=i.title)||void 0===r?void 0:r.length)>0?a({...m(i.title,o),ok:!0}):a({message:f(o),ok:!0});case"failed":var l;return(null===(l=i.title)||void 0===l?void 0:l.length)>0?a({...m(i.title,o),ok:!1}):a({message:h(o,"Object.ActionButton.Automation.AutomationError","Automation error"),ok:!1});case"finished with warnings":var s;return(null===(s=i.title)||void 0===s?void 0:s.length)>0?a({...m(i.title,o),ok:!1}):a({message:f(o),ok:!0});case"must stop":case"stopped":var c;return(null===(c=i.title)||void 0===c?void 0:c.length)>0?a({...m(i.title,o),ok:!1}):a({message:h(o,"Object.ActionButton.Automation.DefaultAutomationMsg","Unknown error"),ok:!1});default:var u;return(null===(u=i.title)||void 0===u?void 0:u.length)>0?a({...m(i.title,o),ok:!0}):a({message:f(o),ok:!0})}},y=(e,t)=>{null!=e&&Object.keys(t).forEach((o=>{e.style[o]=t[o]}))},w=e=>{y(e,{opacity:0}),setTimeout((()=>{e.remove()}),1e3)},k=(e,o,n)=>{const{message:a,url:l,urlText:s}=e,u=t(a),p=document.createElement("div"),g=`sn-action-button-snackbar-${(Math.random()+1).toString(36).substring(7)}`;p.setAttribute("id",g);const b=document.querySelectorAll(".sn-action-button-snackbar"),h=24+5*((null==b?void 0:b.length)||0),f=t(s||"Open");y(p,{width:"400px",height:"35px","background-color":"#FFFFFF",position:"fixed",left:"calc(50% - 200px)",right:"auto",bottom:`${h}px`,"box-shadow":"0px 1px 2px 0px rgb(0 0 0 / 15%)",padding:"6px 16px","border-radius":"3px","z-index":1e3,opacity:0,transition:"visibility 0ms, opacity 400ms linear"});const m=`<div class="sn-action-button-snackbar" style="display: flex; justify-content: space-between; height: 100%; align-items: center;">\n ${n?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" fill="currentColor" aria-hidden="true" role="img">\n <path d="M6.919.439A1.5 1.5 0 0 1 8.925.336l.114.103 6.48 6.48a1.5 1.5 0 0 1 .102 2.006l-.102.114-6.48 6.48a1.5 1.5 0 0 1-2.006.102l-.114-.102-6.48-6.48a1.5 1.5 0 0 1-.103-2.006l.103-.114 6.48-6.48Zm1.56 10.54h-1c-.267 0-.455.158-.493.404l-.007.096v1c0 .266.158.454.404.492l.096.008h1c.266 0 .454-.158.492-.404l.008-.096v-1c0-.267-.158-.455-.404-.493l-.096-.007Zm0-8h-1c-.3 0-.5.2-.5.5v5c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5Z"></path>\n </svg>':'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" height="16px" fill="currentColor" aria-hidden="true" role="img" data-testid="status-indicator__valid">\n <defs>\n <path id="tick_svg__tick-a" d="m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"></path>\n </defs>\n <use xlink:href="#tick_svg__tick-a" fill-rule="evenodd"></use>\n </svg>'} \n <span class="sn-action-button-snackbar-text" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">${u}${l?`<a href="${(e=>{const t=i(e),o=r(e);return`${t}${c(o)}`})(l)}" style="margin-left: 6px;" target="${v=o,v?d()?"_parent":"_self":"_blank"}">${f}</a>`:""}</span>\n <span style="cursor: pointer;">\n <svg class="sn-action-button-snackbar-close" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor">\n <path d="M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z">\n </path>\n </svg>\n </span>\n </div>`;var v;return p.innerHTML=m,p},x=async({app:e,automationId:t,bookmark:o,senseNavigation:n})=>{const a=await(async()=>{const e=await fetch("../api/v1/users/me");return await e.json()})();return{id:t,inputs:{app:e.id,bookmark:o,sheet:null==n?void 0:n.getCurrentSheetId(),user:a.id,space:await b(e.id),tenant:a.tenantId,time:new Date},context:"qsbutton"}},A=async(e,t)=>{var o;let{automationId:n}=e;"object"==typeof e.automationId&&null!==(o=e.automationId)&&void 0!==o&&null!==(o=o.qStringExpression)&&void 0!==o&&o.qExpr&&(n=await t.app.evaluate(e.automationId.qStringExpression.qExpr));const a=await(async e=>{if(e.length>2)return(await fetch(`../api/v1/automations/${e}`)).json();return null})(n);return null==a?void 0:a.executionToken},S=[{value:"applyBookmark",translation:"Object.ActionButton.ApplyBookmark",group:"bookmark",hide:({isUnsupportedFeature:e})=>null==e?void 0:e("bookmarks"),getActionCall:({app:e,bookmark:t})=>async()=>{var o,n;const a=await e.getBookmarkList(),i=a.find((e=>e.qInfo.qId===t));var r;((null==i||null===(o=i.qData)||void 0===o||null===(o=o.qBookmark)||void 0===o||null===(o=o.qPatches)||void 0===o?void 0:o.length)>0||null!=i&&null!==(n=i.qMeta)&&void 0!==n&&n.isExtended)&&await(null===(r=e.clearAllSoftPatches)||void 0===r?void 0:r.call(e));const l=a.find((e=>e.qData.title===t));t&&await e.applyBookmark(l&&l.qInfo&&l.qInfo.qId||t)},requiredInput:["bookmark"]},{value:"back",translation:"Object.ActionButton.MoveBackward",group:"selection",getActionCall:({app:e})=>async()=>{await e.back()},requiredInput:[]},{value:"forward",translation:"Object.ActionButton.MoveForward",group:"selection",getActionCall:({app:e})=>async()=>{await e.forward()},requiredInput:[]},{value:"clearAll",translation:"Object.ActionButton.ClearAll",group:"selection",getActionCall:({app:e,softLock:t})=>async()=>{await e.clearAll(t)},requiredInput:["softLock"]},{value:"clearAllButThis",translation:"Object.ActionButton.ClearAllButThis",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t),a=!1;await n.clearAllButThis(a)}},requiredInput:["field"]},{value:"clearField",translation:"Object.ActionButton.ClearSelectionInField",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t);await n.clear()}},requiredInput:["field"]},{value:"selectAll",translation:"Object.ActionButton.SelectAllInField",group:"selection",getActionCall:({app:e,qStateName:t,field:o,softLock:n})=>async()=>{if(o){const a=await e.getField(o,t);await a.selectAll(n)}},requiredInput:["field","softLock"]},{value:"selectValues",translation:"Object.ActionButton.SelectValuesInField",group:"selection",getActionCall:({app:e,qStateName:t,field:o,value:n,softLock:a})=>async i=>{const r=null!=i?i:n;if(o){const n=await e.getField(o,t),i=await e.getFieldDescription(o),l=await(async(e,t,o)=>{let n=t.split(";");if(o){let t="";n.forEach((e=>{t+=`Num('${e}')&';'&`})),n=(await e.evaluate(t.slice(0,-5))).split(";")}return n.map((e=>Number.isNaN(+e)?{qText:e}:{qIsNumeric:!0,qNumber:Number(e)}))})(e,r,i.qTags.includes("$date"));await n.selectValues(l,!1,a)}},requiredInput:["field","value","softLock"]},{value:"selectMatchingValues",translation:"Object.ActionButton.SelectMatchingValues",group:"selection",getActionCall:({app:e,qStateName:t,field:o,value:n})=>async a=>{const i=null!=a?a:n;if(o){const n=await e.getField(o,t),a=!1;await n.select(i,!1,a)}},requiredInput:["field","value"]},{value:"selectAlternative",translation:"Object.ActionButton.SelectAlternatives",group:"selection",getActionCall:({app:e,qStateName:t,field:o,softLock:n})=>async()=>{if(o){const a=await e.getField(o,t);await a.selectAlternative(n)}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field","softLock"]},{value:"cyclicDimension",translation:"Object.ActionButton.CyclicDimension",group:"selection",getActionCall:({cyclicDimensionId:e,indexStepper:t,app:o})=>async()=>{const n=await o.getDimension(e);await n.stepCycle(t)},requiredInput:["cyclicDimension","indexStepper"]},{value:"cyclicDimensionSetActive",translation:"Object.ActionButton.CyclicDimensionSetActive",group:"selection",getActionCall:({cyclicDimensionId:e,groupFieldIndex:t,app:o,isEnabled:n})=>async()=>{if(n("IM_6926_SET_ACTIVE_FIELD_BUTTON")){const n=await o.getDimension(e);await n.setActiveField(t)}},hide:({isEnabled:e})=>!e("IM_6926_SET_ACTIVE_FIELD_BUTTON"),requiredInput:["cyclicDimension","groupFieldIndex"]},{value:"selectExcluded",translation:"Object.ActionButton.SelectExcluded",group:"selection",getActionCall:({app:e,qStateName:t,field:o,softLock:n})=>async()=>{if(o){const a=await e.getField(o,t);await a.selectExcluded(n)}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field","softLock"]},{value:"selectPossible",translation:"Object.ActionButton.SelectPossibleValues",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t),a=!1;await n.selectPossible(a)}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field"]},{value:"toggleSelect",translation:"Object.ActionButton.ToggleFieldSelection",group:"selection",getActionCall:({app:e,qStateName:t,field:o,value:n})=>async a=>{const i=null!=a?a:n;if(o){const n=await e.getField(o,t),a=!1;await n.toggleSelect(i,a)}},requiredInput:["field","value"]},{value:"lockAll",translation:"Object.ActionButton.LockAllSelections",group:"selection",getActionCall:({app:e})=>async()=>{await e.lockAll()},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:[]},{value:"lockField",translation:"Object.ActionButton.LockField",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t);await n.lock()}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field"]},{value:"unlockAll",translation:"Object.ActionButton.UnlockAllSelections",group:"selection",getActionCall:({app:e})=>async()=>{await e.unlockAll()},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:[]},{value:"unlockField",translation:"Object.ActionButton.UnlockAField",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t);await n.unlock()}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field"]},{value:"setVariable",translation:"Object.ActionButton.SetVariable",group:"variables",getActionCall:({app:e,variable:t,value:o})=>async(n,a)=>{const i=null!=n?n:o,r=null!=a?a:t;if(r)try{const t=await e.getVariableByName(r);await t.setStringValue(i)}catch(e){}},requiredInput:["variable","value"]},{value:"doReload",translation:"Object.ActionButton.DoReload",group:"reload",hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("reloadData"),getActionCall:({app:e,partial:t,platform:o,isEnabled:n})=>async()=>{if(null!=o&&o.isCloud&&!t&&n("IM_2843_BUTTON_STATELESS_RELOAD"))await fetch("../api/v1/reloads",{method:"POST",headers:{"Content-Type":"application/json","qlik-csrf-token":await g()},body:JSON.stringify({appId:e.id,partial:t})});else{await e.doReload(0,!!t,!1)&&await e.doSave()}},requiredInput:["partial"]},{translation:"Object.ActionButton.ExecuteAutomation",value:"executeAutomation",getActionCall:({app:e,automation:t,automationId:o,automationTriggered:n,automationExecutionToken:a,automationPostData:i,automationShowNotification:r,automationNotificationDuration:l,automationOpenLinkSameWindow:s,translator:c,senseNavigation:u})=>async()=>{if(o.length)try{let t,p;if(!(void 0!==o&&o.length>1))return;t=((e,t,o)=>t?`../api/v1/automations/${e}/actions/execute?X-Execution-Token=${o}`:`../api/v1/automations/${e}/runs`)(o,n,a),i&&(p=await(async e=>e.createTemporaryBookmark({qOptions:{qIncludeVariables:!0,qIncludeAllPatches:!0}}))(e));const d=await x({app:e,automationId:o,bookmark:p,senseNavigation:u}),b=await(async(e,t,o)=>{const n={"Content-Type":"application/json","qlik-csrf-token":await g()};return e&&(n["X-Execution-Token"]=t),{method:"POST",headers:n,body:JSON.stringify(e?o.inputs:o)}})(n,a,d),f=await fetch(t,b),A=await(async(e,t,o,n)=>{let a;switch(o.status){case 200:case 201:{const i=await o.json(),{status:r,guid:l,id:s}=i,c=void 0===s?l:s;if(t&&"queued"!==r)a=m(i,n),a.ok=!0;else{const t=new Promise((t=>{v(e,c,n,0,t)}));a=await t}break}case 400:a={message:h(n,"Object.ActionButton.Automation.BadRequest","Bad request"),ok:!1};break;case 401:case 403:a={message:h(n,"Object.ActionButton.Automation.NotAuthorized","You are not authorized to run this automation"),ok:!1};break;case 404:a={message:h(n,"Object.ActionButton.Automation.AutomationNotFound","Automation not found"),ok:!1};break;case 500:case 503:a={message:h(n,"Object.ActionButton.Automation.AutomationError","Automation error"),ok:!1};break;default:a={message:h(n,"Object.ActionButton.Automation.UnkownError","Unknown error"),ok:!1}}return a})(o,n,f,c);r&&(async(e,t,o)=>{const n=k(e,o,!e.ok);n.focus(),n.querySelector(".sn-action-button-snackbar-close").addEventListener("click",(()=>{w(n)})),document.querySelector("body").appendChild(n),y(n,{opacity:1}),setTimeout((()=>{w(n)}),Math.max(1e3*t-400,1))})(A,l,s)}catch(e){}else void 0!==t&&(async(e,t,o)=>{try{e=encodeURIComponent(e);const n=await fetch(`../api/v1/items/${e}`).then((e=>e.json())),a=await fetch(`../api/v1/automations/${n.resourceId}`).then((e=>e.json()));let i=`../api/v1/automations/${a.id}/actions/execute?X-Execution-Token=${a.executionToken}`;if(t){const t=await fetch(`../api/v1/automations/${n.resourceId}/blocks`).then((e=>e.json())).then((e=>{let t=[];for(let o=0;o<e.blocks.length;o++)if("FormBlock"===e.blocks[o].type){t=e.blocks[o].form;break}return t}));if(t.length>0){const n=new Date,a={qProp:{qInfo:{qId:`automation_${o.id}_${e}_${n.getTime()}`,qType:"bookmark"},qMetaDef:{title:`Generated automation bookmark on ${n.toISOString()}`,description:"Generated to provide target automation with bookmark to get current selection state",_createdBy:"sn-action-button",_createdFor:"automation",_createdOn:`${n.toISOString()}`,_id:`automation_${encodeURIComponent(o.id)}_${e}_${n.getTime()}`}}},r=await o.createBookmark(a).then((e=>e.getLayout())).then((e=>e.qInfo.qId));await o.saveObjects(),i=`${i}&${t[0].label.toLowerCase()}=${encodeURIComponent(o.id)}&${t[1].label.toLowerCase()}=${r}`}}await fetch(i).then((e=>e.json()))}catch(e){}})(t,i,e)},requiredInput:["automation"],hide:({isEnabled:e})=>!(null!=e&&e("ACTION_BUTTON_AUTOMATIONS"))},{value:"refreshDynamicViews",translation:"Object.ActionButton.RefreshDynamicViews",group:"dynamicViews",getActionCall:({senseNavigation:e})=>async()=>{"function"==typeof e.refreshDynamicViews&&await e.refreshDynamicViews()},requiredInput:[]}],I=e=>S.filter((t=>{var o;return!(null!==(o=t.hide)&&void 0!==o&&o.call(t,e))}));function O(e,t){const o=S.find((t=>e.actionType===t.value));return o&&o.requiredInput&&-1!==o.requiredInput.indexOf(t)}const C=async e=>(await e.getSheetList()).filter((e=>function(e){if(e&&e.length>=2&&"/"===e[0]&&"/"===e[1])return!0;const t=e?+e:-1;return Number.isNaN(+t)?"true"===e.toLowerCase():0!==t}(e.qData.showCondition))).sort(((e,t)=>e.qData.rank-t.qData.rank)),E=[{translation:"Object.ActionButton.NoNavigation",value:"none"},{translation:"Object.ActionButton.GoToNextSheet",value:"nextSheet",navigationCall:async({senseNavigation:e})=>{await e.nextSheet()},requiredInput:[]},{translation:"Object.ActionButton.GoToPreviousSheet",value:"prevSheet",navigationCall:async({senseNavigation:e})=>{await e.prevSheet()},requiredInput:[]},{translation:"Object.ActionButton.GoToLastSheet",value:"lastSheet",navigationCall:async({app:e,senseNavigation:t})=>{const o=await C(e);await t.goToSheet(o[o.length-1].qInfo.qId)},requiredInput:[]},{translation:"Object.ActionButton.GoToFirstSheet",value:"firstSheet",navigationCall:async({app:e,senseNavigation:t})=>{const o=await C(e);await t.goToSheet(o[0].qInfo.qId)},requiredInput:[]},{translation:"Object.ActionButton.GoToASheet",value:"goToSheet",navigationCall:async({senseNavigation:e,sheet:t,chartId:o})=>{t&&await e.goToSheet(t,o)},requiredInput:["sheet","chartId"]},{translation:"Object.ActionButton.GoToSheetById",value:"goToSheetById",navigationCall:async({senseNavigation:e,sheet:t})=>{t&&await e.goToSheet(t)},requiredInput:["sheetId"]},{translation:"Object.ActionButton.GoToStory",hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("storytelling"),value:"goToStory",navigationCall:async({senseNavigation:e,story:t})=>{t&&await e.goToStory(t)},requiredInput:["story"]},{translation:"Object.ActionButton.OpenWebsiteEmail",value:"openWebsite",navigationCall:async({websiteUrl:e,sameWindow:t})=>{try{if(e){const o=i(e),n=r(e),l=(e=>{let t;try{t=new URL(e)}catch(e){return!1}return t.protocol===a})(n);let s="";if(l&&window.open(n,s,"noopener"),t&&(s=d()?"_parent":"_self",window.open(`${o}${n}`,s,"noopener")),!l&&!t){const e=c(n);window.open(`${o}${e}`,s,"noopener")}}}catch(e){}},requiredInput:["websiteUrl","sameWindow"]},{translation:"Object.ActionButton.DocumentChain",value:"openChainedApp",hide:({isEnabled:e,isUnsupportedFeature:t})=>!(null!=e&&e("ACTION_BUTTON_DOCUMENT_CHAINING"))||(null==t?void 0:t("bookmarks")),navigationCall:async({app:e,sameWindow:t,appId:o,sheet:n})=>{const a=e.storeTempSelectionState&&await e.storeTempSelectionState();let i="";t&&(i=d()?"_parent":"_self");const r=n?`/sheet/${encodeURIComponent(n)}`:"",l=`../sense/app/${encodeURIComponent(o)}${r}/tempselectionstate/${encodeURIComponent(a)}`;window.open(l,i,"noopener")},requiredInput:["sameWindow","appId","sheetId"]},{translation:"Object.ActionButton.SelectOdagApp",value:"odagLink",navigationCall:async({app:e,senseNavigation:t,odagLink:o,element:n})=>{"function"==typeof t.openOdagPopup&&o&&o.length>0&&await t.openOdagPopup(e,o,n)},requiredInput:["odagLink"]}],T=e=>E.filter((t=>{var o;return!(null!==(o=t.hide)&&void 0!==o&&o.call(t,e))})),B=(e,t)=>{const o=E.find((t=>e.navigation.action===t.value));return o&&o.requiredInput&&-1!==o.requiredInput.indexOf(t)};var N={LABEL:"Button",FONT_SIZE:.5,FONT_SIZE_FIXED:20,FONT_COLOR:{index:-1,color:"#ffffff"},FONT_STYLE:{bold:!0,italic:!1,underline:!1},FONT_FAMILY:"Source Sans Pro",SIZE_BEHAVIOR:"responsive",TEXT_ALIGN:"center",COLOR:{index:-1,color:"none"},ICON_POSITION:"left",BGIMAGE_MODE:"none",BGIMAGE_POSITION:"center-center",BACKGROUND_SIZE:"auto",BACKGROUND_POSITION:"centerCenter",BORDER_RADIUS:0,BORDER_WIDTH:0},q=[{value:"image",icon:"image",label:"Image"},{value:"back",icon:"back",label:"Back"},{value:"forward",icon:"forward",label:"Forward"},{value:"history",icon:"history",label:"History"},{value:"help",icon:"help",label:"Help"},{value:"info",icon:"info",label:"Info"},{value:"text",icon:"text",label:"Text"},{value:"group",icon:"group",label:"Group"},{value:"search",icon:"search",label:"Search"},{value:"zoom-in",icon:"zoom-in",label:"Zoom in"},{value:"zoom-out",icon:"zoom-out",label:"Zoom out"},{value:"export",icon:"export",label:"Export"},{value:"import",icon:"import",label:"Import"},{value:"field",icon:"field",label:"Field"},{value:"lock",icon:"lock",label:"Lock"},{value:"unlock",icon:"unlock",label:"Unlock"},{value:"database",icon:"database",label:"Database"},{value:"calendar",icon:"calendar",label:"Calendar"},{value:"bookmark",icon:"bookmark",label:"Bookmark"},{value:"library",icon:"library",label:"Library"},{value:"star",icon:"star",label:"Star"},{value:"print",icon:"print",label:"Print"},{value:"remove",icon:"remove",label:"Remove"},{value:"handle",icon:"handle",label:"Handle"},{value:"handle-horizontal",icon:"handle-horizontal",label:"Handle horizontal"},{value:"menu",icon:"menu",label:"Menu"},{value:"list",icon:"list",label:"List"},{value:"unordered-list",icon:"unordered-list",label:"Unordered list"},{value:"clock",icon:"clock",label:"Clock"},{value:"puzzle",icon:"puzzle",label:"Puzzle"},{value:"filterpane",icon:"filterpane",label:"Filterpane"},{value:"plus",icon:"plus",label:"Plus"},{value:"minus",icon:"minus",label:"Minus"},{value:"triangle-top",icon:"triangle-top",label:"Triangle top"},{value:"triangle-bottom",icon:"triangle-bottom",label:"Triangle bottom"},{value:"triangle-left",icon:"triangle-left",label:"Triangle left"},{value:"triangle-right",icon:"triangle-right",label:"Triangle right"},{value:"tick",icon:"tick",label:"Tick"},{value:"cogwheel",icon:"cogwheel",label:"Cogwheel"},{value:"settings",icon:"settings",label:"Settings"},{value:"cut",icon:"cut",label:"Cut"},{value:"copy",icon:"copy",label:"Copy"},{value:"paste",icon:"paste",label:"Paste"},{value:"camera",icon:"camera",label:"Camera"},{value:"slide-show",icon:"slide-show",label:"Slide show"},{value:"palette",icon:"palette",label:"Palette"},{value:"shapes",icon:"shapes",label:"Shapes"},{value:"effects",icon:"effects",label:"Effects"},{value:"file",icon:"file",label:"File"},{value:"expand",icon:"expand",label:"Expand"},{value:"collapse",icon:"collapse",label:"Collapse"},{value:"bin",icon:"bin",label:"Bin"},{value:"link",icon:"link",label:"Link"},{value:"pivot",icon:"pivot",label:"Pivot"},{value:"reload",icon:"reload",label:"Reload"},{value:"add",icon:"add",label:"Add"},{value:"edit",icon:"edit",label:"Edit"},{value:"key",icon:"key",label:"Key"},{value:"box",icon:"box",label:"Box"},{value:"home",icon:"home",label:"Home"},{value:"person",icon:"person",label:"Person"},{value:"grid",icon:"grid",label:"Grid"},{value:"cloud",icon:"cloud",label:"Cloud"},{value:"more",icon:"more",label:"More"},{value:"folder",icon:"folder",label:"Folder"},{value:"drop",icon:"drop",label:"Drop"},{value:"play",icon:"play",label:"Play"},{value:"tag",icon:"tag",label:"Tag"},{value:"close",icon:"close",label:"Close"},{value:"warning",icon:"warning",label:"Warning"},{value:"warning-triangle",icon:"warning-triangle",label:"Warning triangle"},{value:"share",icon:"share",label:"Share"},{value:"top",icon:"top",label:"Top"},{value:"low-resolution",icon:"low-resolution",label:"Low resolution"},{value:"high-resolution",icon:"high-resolution",label:"High resolution"},{value:"view",icon:"view",label:"View"},{value:"control",icon:"control",label:"Control"},{value:"code",icon:"code",label:"Code"},{value:"upload",icon:"upload",label:"Upload"},{value:"repair",icon:"repair",label:"Repair"},{value:"split",icon:"split",label:"Split"},{value:"up-down",icon:"up-down",label:"Up down"},{value:"disconnect",icon:"disconnect",label:"Disconnect"},{value:"photo-library",icon:"photo-library",label:"Photo library"},{value:"application",icon:"application",label:"Application"},{value:"new-tab",icon:"new-tab",label:"New tab"},{value:"ascending",icon:"ascending",label:"Ascending"},{value:"descending",icon:"descending",label:"Descending"},{value:"arrow-up",icon:"arrow-up",label:"Arrow up"},{value:"arrow-down",icon:"arrow-down",label:"Arrow down"},{value:"arrow-right",icon:"arrow-right",label:"Arrow right"},{value:"arrow-left",icon:"arrow-left",label:"Arrow left"},{value:"sync",icon:"sync",label:"Sync"},{value:"draggable",icon:"draggable",label:"Draggable"},{value:"book",icon:"book",label:"Book"},{value:"measure",icon:"measure",label:"Measure"},{value:"download",icon:"download",label:"Download"},{value:"more-rounded",icon:"more-rounded",label:"More rounded"},{value:"align-object-left",icon:"align-object-left",label:"Align object-left"},{value:"align-object-center",icon:"align-object-center",label:"Align object-center"},{value:"align-object-right",icon:"align-object-right",label:"Align object-right"},{value:"submit",icon:"submit",label:"Submit"},{value:"operators",icon:"operators",label:"Operators"},{value:"general-data-class",icon:"general-data-class",label:"General data-class"},{value:"building",icon:"building",label:"Building"},{value:"bell",icon:"bell",label:"Bell"},{value:"unlink",icon:"unlink",label:"Unlink"},{value:"lightbulb",icon:"lightbulb",label:"Lightbulb"},{value:"log-in",icon:"log-in",label:"Log in"},{value:"log-out",icon:"log-out",label:"Log out"},{value:"previous",icon:"previous",label:"Previous"},{value:"goto",icon:"goto",label:"Goto"},{value:"save",icon:"save",label:"Save"},{value:"pause",icon:"pause",label:"Pause"},{value:"stop",icon:"stop",label:"Stop"},{value:"step-in",icon:"step-in",label:"Step in"},{value:"comment",icon:"comment",label:"Comment"},{value:"indent",icon:"indent",label:"Indent"},{value:"undent",icon:"undent",label:"Undent"},{value:"filter",icon:"filter",label:"Filter"},{value:"clear-filter",icon:"clear-filter",label:"Clear filter"},{value:"insert",icon:"insert",label:"Insert"},{value:"direction-left",icon:"direction-left",label:"Direction left"},{value:"swap",icon:"swap",label:"Swap"},{value:"bubbles",icon:"bubbles",label:"Bubbles"},{value:"sheet",icon:"sheet",label:"Sheet"},{value:"object",icon:"object",label:"Object"},{value:"clear-selections",icon:"clear-selections",label:"Clear selections"},{value:"selections-tool",icon:"selections-tool",label:"Selections tool"},{value:"selections-reload",icon:"selections-reload",label:"Selections reload"},{value:"selections-back",icon:"selections-back",label:"Selections back"},{value:"selections-forward",icon:"selections-forward",label:"Selections forward"},{value:"expression",icon:"expression",label:"Expression"},{value:"select-alternative",icon:"select-alternative",label:"Select alternative"},{value:"select-possible",icon:"select-possible",label:"Select possible"},{value:"select-excluded",icon:"select-excluded",label:"Select excluded"},{value:"select-all",icon:"select-all",label:"Select all"},{value:"bar-chart",icon:"bar-chart",label:"Bar chart"},{value:"bar-chart-horizontal",icon:"bar-chart-horizontal",label:"Bar chart-horizontal"},{value:"line-chart",icon:"line-chart",label:"Line chart"},{value:"pie-chart",icon:"pie-chart",label:"Pie chart"},{value:"gauge-chart",icon:"gauge-chart",label:"Gauge chart"},{value:"kpi",icon:"kpi",label:"Kpi"},{value:"scatter-chart",icon:"scatter-chart",label:"Scatter chart"},{value:"map",icon:"map",label:"Map"},{value:"table",icon:"table",label:"Table"},{value:"pivot-table",icon:"pivot-table",label:"Pivot table"},{value:"treemap",icon:"treemap",label:"Treemap"},{value:"combo-chart",icon:"combo-chart",label:"Combo chart"},{value:"boxplot",icon:"boxplot",label:"Boxplot"},{value:"distributionplot",icon:"distributionplot",label:"Distributionplot"},{value:"histogram",icon:"histogram",label:"Histogram"},{value:"direct-discovery",icon:"direct-discovery",label:"Direct discovery"},{value:"data-model",icon:"data-model",label:"Data model"},{value:"script",icon:"script",label:"Script"},{value:"script-ok",icon:"script-ok",label:"Script ok"},{value:"debug",icon:"debug",label:"Debug"},{value:"auto-layout",icon:"auto-layout",label:"Auto layout"}];const F={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},$={resolveExpression:e=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(t[1]/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e),t)return e;const o=e&&F[e.toLowerCase()];if(o){const e=void 0!==o.a?o.a:1;return`rgba(${o.r},${o.g},${o.b},${e})`}return"none"},getFadedColor(e){const t=.15;let o,n,a,i;if(e.length>7){o=e.split(",");const r=-1!==o[0].indexOf("a");return n=r?parseInt(o[0].slice(5),10):parseInt(o[0].slice(4),10),i=parseInt(o[1],10),a=parseInt(o[2],10),`${(r?"rgba(":"rgb(")+(Math.round((0-n)*t)+n)},${Math.round((0-i)*t)+i},${Math.round((0-a)*t)+a}${r?`,${o[3]}`:")"}`}return o=parseInt(e.slice(1),16),n=o>>16,i=o>>8&255,a=255&o,`#${(16777216+65536*(Math.round((0-n)*t)+n)+256*(Math.round((0-i)*t)+i)+(Math.round((0-a)*t)+a)).toString(16).slice(1)}`},getColor({useColorExpression:e=!1,colorExpression:t="",color:o=N.COLOR},n,a){let i;return e?i=$.resolveExpression(t):"string"==typeof o?i=o:o&&(i=a.getColorPickerColor(o)),i&&"none"!==i?i:n}},L={auto:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",fill:"100% 100%",alwaysFill:"cover",stretchFit:"100% 100%"},j={"top-left":"top left","center-left":"center left","bottom-left":"bottom left","top-center":"top center","center-center":"center center","bottom-center":"bottom center","top-right":"top right","center-right":"center right","bottom-right":"bottom right",topLeft:"0% 0%",centerLeft:"50% 0%",bottomLeft:"100% 0%",topCenter:"0% 50%",centerCenter:"50% 50%",bottomCenter:"100% 50%",topRight:"0% 100%",centerRight:"50% 100%",bottomRight:"100% 100%"},D=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],_=[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],M=[{value:"responsive",translation:"properties.responsive"},{value:"relative",translation:"properties.fluid"},{value:"fixed",translation:"properties.fixed"}],V=e=>e%1!=0?e.toFixed(2):e,R=(e,t,o,n)=>{t.offsetWidth<=e.clientWidth?o.style.overflow="visible":o.style.overflow="hidden",n&&(t.children[0].style.marginRight=`${V(.04*t.offsetWidth)}px`)},P=(e,t,o,n,a)=>{if("fixed"===t.sizeBehavior)o.style.fontSize=`${t.sizeFixed||N.FONT_SIZE_FIXED}px`,R(e,o,n,a);else if("relative"===t.sizeBehavior){const i=t.size||N.FONT_SIZE,r=40/i,l=Math.min(e.clientWidth/r*10,e.clientHeight*i*.8);o.style.fontSize=`${l}px`,R(e,o,n,a)}else{o.style.fontSize=`${e.clientHeight}px`;let n=e.clientHeight/o.offsetHeight*e.clientHeight;o.style.fontSize=`${n}px`,o.offsetWidth>e.clientWidth&&(n*=e.clientWidth/o.offsetWidth);((e,t,o,n)=>{t.style&&t.style.italic?n?(e.style.fontSize=`${V(Math.max(.84*o,8))}px`,e.children[0].style.marginRight=`${V(.04*e.offsetWidth)}px`,e.children[1].style.marginRight=`${V(.04*e.offsetWidth)}px`):(e.style.fontSize=`${V(Math.max(.9*o,8))}px`,e.children[0].style.marginRight=`${V(.02*e.offsetWidth)}px`):n?(e.style.fontSize=`${V(Math.max(.88*o,8))}px`,e.children[0].style.marginRight=`${V(.04*e.offsetWidth)}px`):e.style.fontSize=`${V(Math.max(.92*o,8))}px`})(o,t,n*(t.size||N.FONT_SIZE),a)}},z=(e,t)=>{const o=t.getDataColorSpecials().primary;return $.getColor(e,o,t)},U=(e,t)=>`${e}: ${t};`;var H={getStyles({style:e={},disabled:t,theme:o,element:n,app:a}){let i="width: 100%;height: 100%;transition: transform .1s ease-in-out;position: absolute;bottom: 0;left: 0; top: 0;right: 0;margin: auto;";const{font:r={},background:l={},border:s={}}=e;return i+=t?U("opacity",.4):U("cursor","pointer"),i+=((e,t,o,n)=>{let a="";a=n("color",$.getColor(e,t,o));const i=e.style||N.FONT_STYLE;return i.bold&&(a+=n("font-weight","bold")),i.italic&&(a+=n("font-style","italic")),a})(r,N.FONT_COLOR.color,o,U),i+=((e,t,o,n)=>{let a=n("background-color",z(e,t));if((e.useImage||"media"===e.mode)&&e.url.qStaticContentUrl){let t=e.url.qStaticContentUrl.qUrl;t&&(t=p(t,o),a+=n("background-image",`url('${t}')`),a+=n("background-size",L[e.size||N.BACKGROUND_SIZE]),a+=n("background-position",j[e.position||N.BACKGROUND_POSITION]),a+=n("background-repeat","no-repeat"))}return a})(l,o,a,U),i+=((e,t,o,n,a)=>{if(!o.useBorder)return"border: none;";let i="";const r=z(t,n),l=Math.min(e.offsetWidth,e.offsetHeight),s=$.getColor(o,$.getFadedColor(r),n);return i=a("border",`${(o.width||N.BORDER_WIDTH)*l/2}px solid ${s}`),i+=a("border-radius",(o.radius||N.BORDER_RADIUS)*l/2+"px"),i})(n,l,s,o,U),i},createLabelAndIcon({button:e,theme:t,style:o={},isSense:n}){var a;const{icon:i={},font:r={},label:l=N.LABEL,showLabel:s=!0}=o,c=document.createElement("text");c.style.whiteSpace="nowrap",c.style.fontFamily=(null==o||null===(a=o.font)||void 0===a?void 0:a.fontFamily)||t.getStyle("","","fontFamily")||N.FONT_FAMILY;const u=((e,t)=>{const o=document.createElement("span");return o.textContent=e,o.style.whiteSpace="nowrap",o.style.textOverflow="ellipsis",(null==t?void 0:t.style)&&t.style.underline&&(o.style.textDecoration="underline"),o})(l,r);c.appendChild(u);const p=n&&i.useIcon&&""!==i.iconType;let d;p&&(d=((e,t)=>{const o=document.createElement("span"),n=e.find((e=>e.label===t.iconType||e.value===t.iconType));return o.style.textDecoration="none",o.style.fontSize="inherit",o.setAttribute("class",`lui-icon lui-icon--${n?n.value:""}`),o})(q,i),"right"===(null==i?void 0:i.position)?c.appendChild(d):c.insertBefore(d,u)),e.innerHTML="",e.appendChild(c),P(e,r,c,u,p),"8px"===c.style.fontSize&&Array.from(c.children).forEach((e=>{e.style.overflow="hidden"})),c.style.margin="0 3%",c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="left"===r.align?"flex-start":"right"===r.align?"flex-end":"center",s||(c.style.height="1px",c.style.width="1px",c.style.overflow="hidden")}};var G={targets:[]};function W(e){return function(e){if(Array.isArray(e))return Z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Z(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var Y=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],K=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var X=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function J(e){var t=e.theme,o=e.translator,n=e.defaultValue,a=e.flags,i=[],r=t.getStyle("","","fontFamilies");return Array.isArray(r)&&r.length?i.push.apply(i,W(new Set([n].concat(W(r.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(n),[{value:"ThemeHeader",label:o.get("properties.themeFonts"),metaText:o.get("properties.theme"),groupHeader:!0}].concat(W(i.map((function(e){return X(e)}))),[{value:"DefaultHeader",label:o.get("properties.allFonts"),metaText:o.get("properties.default"),groupHeader:!0}],W(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?K:Y}(a).map((function(e){return X(e)}))))}function Q(e){var t=e.theme,o=e.translator,n=e.id,a=e.path,i=e.flags,r=function(){return t.getStyle(n,a,"fontFamily")};return{getDefaultValue:function(){return r()},getOptions:function(){return J({theme:t,translator:o,defaultValue:r(),flags:i})}}}var ee=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],te=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function oe(e){var t=e.theme,o=e.translator,n=e.id,a=e.path,i=function(){return t.getStyle(n,a,"fontSize")};return{getDefaultValue:function(){return i()},getOptions:function(){return function(e){var t=e.translator,o=e.defaultValue,n=[],a=e.theme.getStyle("","","fontSizes");return Array.isArray(a)&&a.length?n.push.apply(n,W(new Set([o].concat(W(a))))):n.push(o),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(W(n.map((function(e){return te(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],W(ee.map((function(e){return te(e)}))))}({theme:t,translator:o,defaultValue:i()})}}}function ne(e){var t=e.theme,o=e.translator,n=e.id,a=e.path;return{fontFamily:Q({theme:t,translator:o,id:n,path:a,flags:e.flags}),fontSize:oe({theme:t,translator:o,id:n,path:a})}}var ae,ie=Object.prototype.hasOwnProperty,re=Object.prototype.toString,le=Object.defineProperty,se=Object.getOwnPropertyDescriptor,ce=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===re.call(e)},ue=function(e){if(!e||"[object Object]"!==re.call(e))return!1;var t,o=ie.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ie.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!n)return!1;for(t in e);return void 0===t||ie.call(e,t)},pe=function(e,t){le&&"__proto__"===t.name?le(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},de=function(e,t){if("__proto__"===t){if(!ie.call(e,t))return;if(se)return se(e,t).value}return e[t]};function ge(e,t,o){e.prototype=t.prototype=o,o.constructor=e}function be(e,t){var o=Object.create(e.prototype);for(var n in t)o[n]=t[n];return o}function he(){}ae=function e(){var t,o,n,a,i,r,l=arguments[0],s=1,c=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<c;++s)if(null!=(t=arguments[s]))for(o in t)n=de(l,o),l!==(a=de(t,o))&&(u&&a&&(ue(a)||(i=ce(a)))?(i?(i=!1,r=n&&ce(n)?n:[]):r=n&&ue(n)?n:{},pe(l,{name:o,newValue:e(u,r,a)})):void 0!==a&&pe(l,{name:o,newValue:a}));return l},ae&&ae.__esModule&&Object.prototype.hasOwnProperty.call(ae,"default")&&ae.default;var fe=1/.7,me="\\s*([+-]?\\d+)\\s*",ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,ke=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),xe=new RegExp(`^rgb\\(${ye},${ye},${ye}\\)$`),Ae=new RegExp(`^rgba\\(${me},${me},${me},${ve}\\)$`),Se=new RegExp(`^rgba\\(${ye},${ye},${ye},${ve}\\)$`),Ie=new RegExp(`^hsl\\(${ve},${ye},${ye}\\)$`),Oe=new RegExp(`^hsla\\(${ve},${ye},${ye},${ve}\\)$`),Ce={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ee(){return this.rgb().formatHex()}function Te(){return this.rgb().formatRgb()}function Be(e){var t,o;return e=(e+"").trim().toLowerCase(),(t=we.exec(e))?(o=t[1].length,t=parseInt(t[1],16),6===o?Ne(t):3===o?new Le(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===o?qe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===o?qe(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ke.exec(e))?new Le(t[1],t[2],t[3],1):(t=xe.exec(e))?new Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ae.exec(e))?qe(t[1],t[2],t[3],t[4]):(t=Se.exec(e))?qe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ie.exec(e))?Re(t[1],t[2]/100,t[3]/100,1):(t=Oe.exec(e))?Re(t[1],t[2]/100,t[3]/100,t[4]):Ce.hasOwnProperty(e)?Ne(Ce[e]):"transparent"===e?new Le(NaN,NaN,NaN,0):null}function Ne(e){return new Le(e>>16&255,e>>8&255,255&e,1)}function qe(e,t,o,n){return n<=0&&(e=t=o=NaN),new Le(e,t,o,n)}function Fe(e){return e instanceof he||(e=Be(e)),e?new Le((e=e.rgb()).r,e.g,e.b,e.opacity):new Le}function $e(e,t,o,n){return 1===arguments.length?Fe(e):new Le(e,t,o,null==n?1:n)}function Le(e,t,o,n){this.r=+e,this.g=+t,this.b=+o,this.opacity=+n}function je(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function De(){const e=_e(this.opacity);return`${1===e?"rgb(":"rgba("}${Me(this.r)}, ${Me(this.g)}, ${Me(this.b)}${1===e?")":`, ${e})`}`}function _e(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Me(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ve(e){return((e=Me(e))<16?"0":"")+e.toString(16)}function Re(e,t,o,n){return n<=0?e=t=o=NaN:o<=0||o>=1?e=t=NaN:t<=0&&(e=NaN),new ze(e,t,o,n)}function Pe(e){if(e instanceof ze)return new ze(e.h,e.s,e.l,e.opacity);if(e instanceof he||(e=Be(e)),!e)return new ze;if(e instanceof ze)return e;var t=(e=e.rgb()).r/255,o=e.g/255,n=e.b/255,a=Math.min(t,o,n),i=Math.max(t,o,n),r=NaN,l=i-a,s=(i+a)/2;return l?(r=t===i?(o-n)/l+6*(o<n):o===i?(n-t)/l+2:(t-o)/l+4,l/=s<.5?i+a:2-i-a,r*=60):l=s>0&&s<1?0:r,new ze(r,l,s,e.opacity)}function ze(e,t,o,n){this.h=+e,this.s=+t,this.l=+o,this.opacity=+n}function Ue(e){return(e=(e||0)%360)<0?e+360:e}function He(e){return Math.max(0,Math.min(1,e||0))}function Ge(e,t,o){return 255*(e<60?t+(o-t)*e/60:e<180?o:e<240?t+(o-t)*(240-e)/60:t)}ge(he,Be,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Pe(this).formatHsl()},formatRgb:Te,toString:Te}),ge(Le,$e,be(he,{brighter(e){return e=null==e?fe:Math.pow(fe,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Le(Me(this.r),Me(this.g),Me(this.b),_e(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:je,formatHex:je,formatHex8:function(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:De,toString:De})),ge(ze,(function(e,t,o,n){return 1===arguments.length?Pe(e):new ze(e,t,o,null==n?1:n)}),be(he,{brighter(e){return e=null==e?fe:Math.pow(fe,e),new ze(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ze(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,o=this.l,n=o+(o<.5?o:1-o)*t,a=2*o-n;return new Le(Ge(e>=240?e-240:e+120,a,n),Ge(e,a,n),Ge(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new ze(Ue(this.h),He(this.s),He(this.l),_e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_e(this.opacity);return`${1===e?"hsl(":"hsla("}${Ue(this.h)}, ${100*He(this.s)}%, ${100*He(this.l)}%${1===e?")":`, ${e})`}`}}));const We=Math.PI/180,Ze=180/Math.PI,Ye=4/29,Ke=6/29,Xe=3*Ke*Ke;function Je(e){if(e instanceof Qe)return new Qe(e.l,e.a,e.b,e.opacity);if(e instanceof at)return it(e);e instanceof Le||(e=Fe(e));var t,o,n=nt(e.r),a=nt(e.g),i=nt(e.b),r=et((.2225045*n+.7168786*a+.0606169*i)/1);return n===a&&a===i?t=o=r:(t=et((.4360747*n+.3850649*a+.1430804*i)/.96422),o=et((.0139322*n+.0971045*a+.7141733*i)/.82521)),new Qe(116*r-16,500*(t-r),200*(r-o),e.opacity)}function Qe(e,t,o,n){this.l=+e,this.a=+t,this.b=+o,this.opacity=+n}function et(e){return e>.008856451679035631?Math.pow(e,1/3):e/Xe+Ye}function tt(e){return e>Ke?e*e*e:Xe*(e-Ye)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function nt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function at(e,t,o,n){this.h=+e,this.c=+t,this.l=+o,this.opacity=+n}function it(e){if(isNaN(e.h))return new Qe(e.l,0,0,e.opacity);var t=e.h*We;return new Qe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ge(Qe,(function(e,t,o,n){return 1===arguments.length?Je(e):new Qe(e,t,o,null==n?1:n)}),be(he,{brighter(e){return new Qe(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Qe(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,o=isNaN(this.b)?e:e-this.b/200;return new Le(ot(3.1338561*(t=.96422*tt(t))-1.6168667*(e=1*tt(e))-.4906146*(o=.82521*tt(o))),ot(-.9787684*t+1.9161415*e+.033454*o),ot(.0719453*t-.2289914*e+1.4052427*o),this.opacity)}})),ge(at,(function(e,t,o,n){return 1===arguments.length?function(e){if(e instanceof at)return new at(e.h,e.c,e.l,e.opacity);if(e instanceof Qe||(e=Je(e)),0===e.a&&0===e.b)return new at(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ze;return new at(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new at(e,t,o,null==n?1:n)}),be(he,{brighter(e){return new at(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new at(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return it(this).rgb()}}));var rt,lt=e=>()=>e;function st(e,t){var o=t-e;return o?function(e,t){return function(o){return e+o*t}}(e,o):lt(isNaN(e)?t:e)}function ct(e){var t=0,o=e.children,n=o&&o.length;if(n)for(;--n>=0;)t+=o[n].value;else t=1;e.value=t}function ut(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=dt)):void 0===t&&(t=pt);for(var o,n,a,i,r,l=new ht(e),s=[l];o=s.pop();)if((a=t(o.data))&&(r=(a=Array.from(a)).length))for(o.children=a,i=r-1;i>=0;--i)s.push(n=a[i]=new ht(a[i])),n.parent=o,n.depth=o.depth+1;return l.eachBefore(bt)}function pt(e){return e.children}function dt(e){return Array.isArray(e)?e[1]:null}function gt(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function bt(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function ht(e){this.data=e,this.depth=this.height=0,this.parent=null}!function e(t){var o=function(e){return 1==(e=+e)?st:function(t,o){return o-t?function(e,t,o){return e=Math.pow(e,o),t=Math.pow(t,o)-e,o=1/o,function(n){return Math.pow(e+n*t,o)}}(t,o,e):lt(isNaN(t)?o:t)}}(t);function n(e,t){var n=o((e=$e(e)).r,(t=$e(t)).r),a=o(e.g,t.g),i=o(e.b,t.b),r=st(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=a(t),e.b=i(t),e.opacity=r(t),e+""}}return n.gamma=e,n}(1),ht.prototype=ut.prototype={constructor:ht,count:function(){return this.eachAfter(ct)},each:function(e,t){let o=-1;for(const n of this)e.call(t,n,++o,this);return this},eachAfter:function(e,t){for(var o,n,a,i=this,r=[i],l=[],s=-1;i=r.pop();)if(l.push(i),o=i.children)for(n=0,a=o.length;n<a;++n)r.push(o[n]);for(;i=l.pop();)e.call(t,i,++s,this);return this},eachBefore:function(e,t){for(var o,n,a=this,i=[a],r=-1;a=i.pop();)if(e.call(t,a,++r,this),o=a.children)for(n=o.length-1;n>=0;--n)i.push(o[n]);return this},find:function(e,t){let o=-1;for(const n of this)if(e.call(t,n,++o,this))return n},sum:function(e){return this.eachAfter((function(t){for(var o=+e(t.data)||0,n=t.children,a=n&&n.length;--a>=0;)o+=n[a].value;t.value=o}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,o=function(e,t){if(e===t)return e;var o=e.ancestors(),n=t.ancestors(),a=null;for(e=o.pop(),t=n.pop();e===t;)a=e,e=o.pop(),t=n.pop();return a}(t,e),n=[t];t!==o;)t=t.parent,n.push(t);for(var a=n.length;e!==o;)n.splice(a,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(o){o!==e&&t.push({source:o.parent,target:o})})),t},copy:function(){return ut(this).eachBefore(gt)},[Symbol.iterator]:function*(){var e,t,o,n,a=this,i=[a];do{for(e=i.reverse(),i=[];a=e.pop();)if(yield a,t=a.children)for(o=0,n=t.length;o<n;++o)i.push(t[o])}while(i.length)}},rt=function(e){
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-action-button"]=t(e.stardust)}(this,(function(e){"use strict";const t=e=>{if(void 0===e)return"";let t="";const o=document.createElement("div"),n=document.createTextNode(e);return o.appendChild(n),t=o.innerHTML,o.removeChild(n),t},o="http://",n="https://",a="mailto:",i=e=>e.startsWith(o)?o:e.startsWith(n)?n:e.startsWith(a)?a:o,r=e=>{let t=e;return e.startsWith(o)&&(t=e.slice(7)),e.startsWith(n)&&(t=e.slice(8)),t},l=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,s=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,c=e=>String(e).replace(s,"$1�$2").replace(l,encodeURI);function u(e){var t;let o,n,a;if(null!=e&&null!==(t=e.session)&&void 0!==t&&t.config){const{config:t}=e.session;o=new URL(t.url);const i=function(e){const t=String(e).split(e.host)[1].split("/");return"app"===t[1]?"":`/${t[1]}`}(o);return a="wss:"===o.protocol,n=a?"https://":"http://",n+o.host+i}}const p=(e,t)=>{e.replace(/^\.\.\//i,"/"),e=(e=e.replace(/"/g,'\\"')).replace(/'/g,"\\'");return e=`${u(t)}/`+("/"===e[0]?e.substr(1):e)},d=()=>{try{return window.self!==window.top}catch(e){return!0}},g=async()=>(await fetch("../api/v1/csrf-token")).headers.get("qlik-csrf-token"),b=async e=>{var t;const o=await fetch(`../api/v1/apps/${e}`),n=await o.json();return(null==n||null===(t=n.attributes)||void 0===t?void 0:t.spaceId)||"personal"},h=(e,t,o)=>{const n=e.get(t);return n===t?o:n},f=e=>h(e,"Object.ActionButton.Automation.DefaultAutomationMsg","Automation finished"),m=(e,t)=>{const o={message:f(t)};if(void 0!==e){if("object"==typeof e)return Array.isArray(e)?(null==e?void 0:e.length)>0?{message:e.join(" ")}:o:Object.keys(e).includes("message")?e:o;try{const t=JSON.parse(e);return Object.keys(t).includes("message")?t:o}catch(t){return""===e?o:"string"==typeof e||"number"==typeof e?{message:e}:o}}return o},v=async(e,t,o,n,a)=>{const i=await(async(e,t)=>(await fetch(`../api/v1/automations/${e}/runs/${t}`)).json())(e,t);switch(i.status){case"queued":case"running":case"not started":case"starting":return n>300?{ok:!1,message:h(o,"geo.findLocation.error.timeout","Timeout")}:setTimeout((()=>v(e,t,o,n+1,a)),2e3);case"finished":var r;return(null===(r=i.title)||void 0===r?void 0:r.length)>0?a({...m(i.title,o),ok:!0}):a({message:f(o),ok:!0});case"failed":var l;return(null===(l=i.title)||void 0===l?void 0:l.length)>0?a({...m(i.title,o),ok:!1}):a({message:h(o,"Object.ActionButton.Automation.AutomationError","Automation error"),ok:!1});case"finished with warnings":var s;return(null===(s=i.title)||void 0===s?void 0:s.length)>0?a({...m(i.title,o),ok:!1}):a({message:f(o),ok:!0});case"must stop":case"stopped":var c;return(null===(c=i.title)||void 0===c?void 0:c.length)>0?a({...m(i.title,o),ok:!1}):a({message:h(o,"Object.ActionButton.Automation.DefaultAutomationMsg","Unknown error"),ok:!1});default:var u;return(null===(u=i.title)||void 0===u?void 0:u.length)>0?a({...m(i.title,o),ok:!0}):a({message:f(o),ok:!0})}},y=(e,t)=>{null!=e&&Object.keys(t).forEach((o=>{e.style[o]=t[o]}))},w=e=>{y(e,{opacity:0}),setTimeout((()=>{e.remove()}),1e3)},k=(e,o,n)=>{const{message:a,url:l,urlText:s}=e,u=t(a),p=document.createElement("div"),g=`sn-action-button-snackbar-${(Math.random()+1).toString(36).substring(7)}`;p.setAttribute("id",g);const b=document.querySelectorAll(".sn-action-button-snackbar"),h=24+5*((null==b?void 0:b.length)||0),f=t(s||"Open");y(p,{width:"400px",height:"35px","background-color":"#FFFFFF",position:"fixed",left:"calc(50% - 200px)",right:"auto",bottom:`${h}px`,"box-shadow":"0px 1px 2px 0px rgb(0 0 0 / 15%)",padding:"6px 16px","border-radius":"3px","z-index":1e3,opacity:0,transition:"visibility 0ms, opacity 400ms linear"});const m=`<div class="sn-action-button-snackbar" style="display: flex; justify-content: space-between; height: 100%; align-items: center;">\n ${n?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" fill="currentColor" aria-hidden="true" role="img">\n <path d="M6.919.439A1.5 1.5 0 0 1 8.925.336l.114.103 6.48 6.48a1.5 1.5 0 0 1 .102 2.006l-.102.114-6.48 6.48a1.5 1.5 0 0 1-2.006.102l-.114-.102-6.48-6.48a1.5 1.5 0 0 1-.103-2.006l.103-.114 6.48-6.48Zm1.56 10.54h-1c-.267 0-.455.158-.493.404l-.007.096v1c0 .266.158.454.404.492l.096.008h1c.266 0 .454-.158.492-.404l.008-.096v-1c0-.267-.158-.455-.404-.493l-.096-.007Zm0-8h-1c-.3 0-.5.2-.5.5v5c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5Z"></path>\n </svg>':'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16" height="16px" fill="currentColor" aria-hidden="true" role="img" data-testid="status-indicator__valid">\n <defs>\n <path id="tick_svg__tick-a" d="m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"></path>\n </defs>\n <use xlink:href="#tick_svg__tick-a" fill-rule="evenodd"></use>\n </svg>'} \n <span class="sn-action-button-snackbar-text" style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">${u}${l?`<a href="${(e=>{const t=i(e),o=r(e);return`${t}${c(o)}`})(l)}" style="margin-left: 6px;" target="${v=o,v?d()?"_parent":"_self":"_blank"}">${f}</a>`:""}</span>\n <span style="cursor: pointer;">\n <svg class="sn-action-button-snackbar-close" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor">\n <path d="M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z">\n </path>\n </svg>\n </span>\n </div>`;var v;return p.innerHTML=m,p},x=async({app:e,automationId:t,bookmark:o,senseNavigation:n})=>{const a=await(async()=>{const e=await fetch("../api/v1/users/me");return await e.json()})();return{id:t,inputs:{app:e.id,bookmark:o,sheet:null==n?void 0:n.getCurrentSheetId(),user:a.id,space:await b(e.id),tenant:a.tenantId,time:new Date},context:"qsbutton"}},A=async(e,t)=>{var o;let{automationId:n}=e;"object"==typeof e.automationId&&null!==(o=e.automationId)&&void 0!==o&&null!==(o=o.qStringExpression)&&void 0!==o&&o.qExpr&&(n=await t.app.evaluate(e.automationId.qStringExpression.qExpr));const a=await(async e=>{if(e.length>2)return(await fetch(`../api/v1/automations/${e}`)).json();return null})(n);return null==a?void 0:a.executionToken},S=[{value:"applyBookmark",translation:"Object.ActionButton.ApplyBookmark",group:"bookmark",hide:({isUnsupportedFeature:e})=>null==e?void 0:e("bookmarks"),getActionCall:({app:e,bookmark:t})=>async()=>{var o,n;const a=await e.getBookmarkList(),i=a.find((e=>e.qInfo.qId===t));var r;((null==i||null===(o=i.qData)||void 0===o||null===(o=o.qBookmark)||void 0===o||null===(o=o.qPatches)||void 0===o?void 0:o.length)>0||null!=i&&null!==(n=i.qMeta)&&void 0!==n&&n.isExtended)&&await(null===(r=e.clearAllSoftPatches)||void 0===r?void 0:r.call(e));const l=a.find((e=>e.qData.title===t));t&&await e.applyBookmark(l&&l.qInfo&&l.qInfo.qId||t)},requiredInput:["bookmark"]},{value:"back",translation:"Object.ActionButton.MoveBackward",group:"selection",getActionCall:({app:e})=>async()=>{await e.back()},requiredInput:[]},{value:"forward",translation:"Object.ActionButton.MoveForward",group:"selection",getActionCall:({app:e})=>async()=>{await e.forward()},requiredInput:[]},{value:"clearAll",translation:"Object.ActionButton.ClearAll",group:"selection",getActionCall:({app:e,softLock:t})=>async()=>{await e.clearAll(t)},requiredInput:["softLock"]},{value:"clearAllButThis",translation:"Object.ActionButton.ClearAllButThis",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t),a=!1;await n.clearAllButThis(a)}},requiredInput:["field"]},{value:"clearField",translation:"Object.ActionButton.ClearSelectionInField",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t);await n.clear()}},requiredInput:["field"]},{value:"selectAll",translation:"Object.ActionButton.SelectAllInField",group:"selection",getActionCall:({app:e,qStateName:t,field:o,softLock:n})=>async()=>{if(o){const a=await e.getField(o,t);await a.selectAll(n)}},requiredInput:["field","softLock"]},{value:"selectValues",translation:"Object.ActionButton.SelectValuesInField",group:"selection",getActionCall:({app:e,qStateName:t,field:o,value:n,softLock:a})=>async i=>{const r=null!=i?i:n;if(o){const n=await e.getField(o,t),i=await e.getFieldDescription(o),l=await(async(e,t,o)=>{let n=t.split(";");if(o){let t="";n.forEach((e=>{t+=`Num('${e}')&';'&`})),n=(await e.evaluate(t.slice(0,-5))).split(";")}return n.map((e=>Number.isNaN(+e)?{qText:e}:{qIsNumeric:!0,qNumber:Number(e)}))})(e,r,i.qTags.includes("$date"));await n.selectValues(l,!1,a)}},requiredInput:["field","value","softLock"]},{value:"selectMatchingValues",translation:"Object.ActionButton.SelectMatchingValues",group:"selection",getActionCall:({app:e,qStateName:t,field:o,value:n})=>async a=>{const i=null!=a?a:n;if(o){const n=await e.getField(o,t),a=!1;await n.select(i,!1,a)}},requiredInput:["field","value"]},{value:"selectAlternative",translation:"Object.ActionButton.SelectAlternatives",group:"selection",getActionCall:({app:e,qStateName:t,field:o,softLock:n})=>async()=>{if(o){const a=await e.getField(o,t);await a.selectAlternative(n)}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field","softLock"]},{value:"cyclicDimension",translation:"Object.ActionButton.CyclicDimension",group:"selection",getActionCall:({cyclicDimensionId:e,indexStepper:t,app:o})=>async()=>{const n=await o.getDimension(e);await n.stepCycle(t)},requiredInput:["cyclicDimension","indexStepper"]},{value:"cyclicDimensionSetActive",translation:"Object.ActionButton.CyclicDimensionSetActive",group:"selection",getActionCall:({cyclicDimensionId:e,groupFieldIndex:t,app:o,isEnabled:n})=>async()=>{if(n("IM_6926_SET_ACTIVE_FIELD_BUTTON")){const n=await o.getDimension(e);await n.setActiveField(t)}},hide:({isEnabled:e})=>!e("IM_6926_SET_ACTIVE_FIELD_BUTTON"),requiredInput:["cyclicDimension","groupFieldIndex"]},{value:"selectExcluded",translation:"Object.ActionButton.SelectExcluded",group:"selection",getActionCall:({app:e,qStateName:t,field:o,softLock:n})=>async()=>{if(o){const a=await e.getField(o,t);await a.selectExcluded(n)}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field","softLock"]},{value:"selectPossible",translation:"Object.ActionButton.SelectPossibleValues",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t),a=!1;await n.selectPossible(a)}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field"]},{value:"toggleSelect",translation:"Object.ActionButton.ToggleFieldSelection",group:"selection",getActionCall:({app:e,qStateName:t,field:o,value:n})=>async a=>{const i=null!=a?a:n;if(o){const n=await e.getField(o,t),a=!1;await n.toggleSelect(i,a)}},requiredInput:["field","value"]},{value:"lockAll",translation:"Object.ActionButton.LockAllSelections",group:"selection",getActionCall:({app:e})=>async()=>{await e.lockAll()},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:[]},{value:"lockField",translation:"Object.ActionButton.LockField",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t);await n.lock()}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field"]},{value:"unlockAll",translation:"Object.ActionButton.UnlockAllSelections",group:"selection",getActionCall:({app:e})=>async()=>{await e.unlockAll()},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:[]},{value:"unlockField",translation:"Object.ActionButton.UnlockAField",group:"selection",getActionCall:({app:e,qStateName:t,field:o})=>async()=>{if(o){const n=await e.getField(o,t);await n.unlock()}},hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("advancedSelectionOptions"),requiredInput:["field"]},{value:"setVariable",translation:"Object.ActionButton.SetVariable",group:"variables",getActionCall:({app:e,variable:t,value:o})=>async(n,a)=>{const i=null!=n?n:o,r=null!=a?a:t;if(r)try{const t=await e.getVariableByName(r);await t.setStringValue(i)}catch(e){}},requiredInput:["variable","value"]},{value:"doReload",translation:"Object.ActionButton.DoReload",group:"reload",hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("reloadData"),getActionCall:({app:e,partial:t,platform:o,isEnabled:n})=>async()=>{if(null!=o&&o.isCloud&&!t&&n("IM_2843_BUTTON_STATELESS_RELOAD"))await fetch("../api/v1/reloads",{method:"POST",headers:{"Content-Type":"application/json","qlik-csrf-token":await g()},body:JSON.stringify({appId:e.id,partial:t})});else{await e.doReload(0,!!t,!1)&&await e.doSave()}},requiredInput:["partial"]},{translation:"Object.ActionButton.ExecuteAutomation",value:"executeAutomation",getActionCall:({app:e,automation:t,automationId:o,automationTriggered:n,automationExecutionToken:a,automationPostData:i,automationShowNotification:r,automationNotificationDuration:l,automationOpenLinkSameWindow:s,translator:c,senseNavigation:u})=>async()=>{if(o.length)try{let t,p;if(!(void 0!==o&&o.length>1))return;t=((e,t)=>t?`../api/v1/automations/${e}/actions/execute`:`../api/v1/automations/${e}/runs`)(o,n),i&&(p=await(async e=>e.createTemporaryBookmark({qOptions:{qIncludeVariables:!0,qIncludeAllPatches:!0}}))(e));const d=await x({app:e,automationId:o,bookmark:p,senseNavigation:u}),b=await(async(e,t,o)=>{const n={"Content-Type":"application/json","qlik-csrf-token":await g()};return e&&(n["X-Execution-Token"]=t),{method:"POST",headers:n,body:JSON.stringify(e?o.inputs:o)}})(n,a,d),f=await fetch(t,b),A=await(async(e,t,o,n)=>{let a;switch(o.status){case 200:case 201:{const i=await o.json(),{status:r,guid:l,id:s}=i,c=void 0===s?l:s;if(t&&"queued"!==r)a=m(i,n),a.ok=!0;else{const t=new Promise((t=>{v(e,c,n,0,t)}));a=await t}break}case 400:a={message:h(n,"Object.ActionButton.Automation.BadRequest","Bad request"),ok:!1};break;case 401:case 403:a={message:h(n,"Object.ActionButton.Automation.NotAuthorized","You are not authorized to run this automation"),ok:!1};break;case 404:a={message:h(n,"Object.ActionButton.Automation.AutomationNotFound","Automation not found"),ok:!1};break;case 500:case 503:a={message:h(n,"Object.ActionButton.Automation.AutomationError","Automation error"),ok:!1};break;default:a={message:h(n,"Object.ActionButton.Automation.UnkownError","Unknown error"),ok:!1}}return a})(o,n,f,c);r&&(async(e,t,o)=>{const n=k(e,o,!e.ok);n.focus(),n.querySelector(".sn-action-button-snackbar-close").addEventListener("click",(()=>{w(n)})),document.querySelector("body").appendChild(n),y(n,{opacity:1}),setTimeout((()=>{w(n)}),Math.max(1e3*t-400,1))})(A,l,s)}catch(e){}else void 0!==t&&(async(e,t,o)=>{try{e=encodeURIComponent(e);const n=await fetch(`../api/v1/items/${e}`).then((e=>e.json())),a=await fetch(`../api/v1/automations/${n.resourceId}`).then((e=>e.json()));let i=`../api/v1/automations/${a.id}/actions/execute?X-Execution-Token=${a.executionToken}`;if(t){const t=await fetch(`../api/v1/automations/${n.resourceId}/blocks`).then((e=>e.json())).then((e=>{let t=[];for(let o=0;o<e.blocks.length;o++)if("FormBlock"===e.blocks[o].type){t=e.blocks[o].form;break}return t}));if(t.length>0){const n=new Date,a={qProp:{qInfo:{qId:`automation_${o.id}_${e}_${n.getTime()}`,qType:"bookmark"},qMetaDef:{title:`Generated automation bookmark on ${n.toISOString()}`,description:"Generated to provide target automation with bookmark to get current selection state",_createdBy:"sn-action-button",_createdFor:"automation",_createdOn:`${n.toISOString()}`,_id:`automation_${encodeURIComponent(o.id)}_${e}_${n.getTime()}`}}},r=await o.createBookmark(a).then((e=>e.getLayout())).then((e=>e.qInfo.qId));await o.saveObjects(),i=`${i}&${t[0].label.toLowerCase()}=${encodeURIComponent(o.id)}&${t[1].label.toLowerCase()}=${r}`}}await fetch(i).then((e=>e.json()))}catch(e){}})(t,i,e)},requiredInput:["automation"],hide:({isEnabled:e})=>!(null!=e&&e("ACTION_BUTTON_AUTOMATIONS"))},{value:"refreshDynamicViews",translation:"Object.ActionButton.RefreshDynamicViews",group:"dynamicViews",getActionCall:({senseNavigation:e})=>async()=>{"function"==typeof e.refreshDynamicViews&&await e.refreshDynamicViews()},requiredInput:[]}],I=e=>S.filter((t=>{var o;return!(null!==(o=t.hide)&&void 0!==o&&o.call(t,e))}));function O(e,t){const o=S.find((t=>e.actionType===t.value));return o&&o.requiredInput&&-1!==o.requiredInput.indexOf(t)}const C=async e=>(await e.getSheetList()).filter((e=>function(e){if(e&&e.length>=2&&"/"===e[0]&&"/"===e[1])return!0;const t=e?+e:-1;return Number.isNaN(+t)?"true"===e.toLowerCase():0!==t}(e.qData.showCondition))).sort(((e,t)=>e.qData.rank-t.qData.rank)),E=[{translation:"Object.ActionButton.NoNavigation",value:"none"},{translation:"Object.ActionButton.GoToNextSheet",value:"nextSheet",navigationCall:async({senseNavigation:e})=>{await e.nextSheet()},requiredInput:[]},{translation:"Object.ActionButton.GoToPreviousSheet",value:"prevSheet",navigationCall:async({senseNavigation:e})=>{await e.prevSheet()},requiredInput:[]},{translation:"Object.ActionButton.GoToLastSheet",value:"lastSheet",navigationCall:async({app:e,senseNavigation:t})=>{const o=await C(e);await t.goToSheet(o[o.length-1].qInfo.qId)},requiredInput:[]},{translation:"Object.ActionButton.GoToFirstSheet",value:"firstSheet",navigationCall:async({app:e,senseNavigation:t})=>{const o=await C(e);await t.goToSheet(o[0].qInfo.qId)},requiredInput:[]},{translation:"Object.ActionButton.GoToASheet",value:"goToSheet",navigationCall:async({senseNavigation:e,sheet:t,chartId:o})=>{t&&await e.goToSheet(t,o)},requiredInput:["sheet","chartId"]},{translation:"Object.ActionButton.GoToSheetById",value:"goToSheetById",navigationCall:async({senseNavigation:e,sheet:t})=>{t&&await e.goToSheet(t)},requiredInput:["sheetId"]},{translation:"Object.ActionButton.GoToStory",hide:({isFeatureBlacklisted:e})=>null==e?void 0:e("storytelling"),value:"goToStory",navigationCall:async({senseNavigation:e,story:t})=>{t&&await e.goToStory(t)},requiredInput:["story"]},{translation:"Object.ActionButton.OpenWebsiteEmail",value:"openWebsite",navigationCall:async({websiteUrl:e,sameWindow:t})=>{try{if(e){const o=i(e),n=r(e),l=(e=>{let t;try{t=new URL(e)}catch(e){return!1}return t.protocol===a})(n);let s="";if(l&&window.open(n,s,"noopener"),t&&(s=d()?"_parent":"_self",window.open(`${o}${n}`,s,"noopener")),!l&&!t){const e=c(n);window.open(`${o}${e}`,s,"noopener")}}}catch(e){}},requiredInput:["websiteUrl","sameWindow"]},{translation:"Object.ActionButton.DocumentChain",value:"openChainedApp",hide:({isEnabled:e,isUnsupportedFeature:t})=>!(null!=e&&e("ACTION_BUTTON_DOCUMENT_CHAINING"))||(null==t?void 0:t("bookmarks")),navigationCall:async({app:e,sameWindow:t,appId:o,sheet:n})=>{const a=e.storeTempSelectionState&&await e.storeTempSelectionState();let i="";t&&(i=d()?"_parent":"_self");const r=n?`/sheet/${encodeURIComponent(n)}`:"",l=`../sense/app/${encodeURIComponent(o)}${r}/tempselectionstate/${encodeURIComponent(a)}`;window.open(l,i,"noopener")},requiredInput:["sameWindow","appId","sheetId"]},{translation:"Object.ActionButton.SelectOdagApp",value:"odagLink",navigationCall:async({app:e,senseNavigation:t,odagLink:o,element:n})=>{"function"==typeof t.openOdagPopup&&o&&o.length>0&&await t.openOdagPopup(e,o,n)},requiredInput:["odagLink"]}],T=e=>E.filter((t=>{var o;return!(null!==(o=t.hide)&&void 0!==o&&o.call(t,e))})),B=(e,t)=>{const o=E.find((t=>e.navigation.action===t.value));return o&&o.requiredInput&&-1!==o.requiredInput.indexOf(t)};var N={LABEL:"Button",FONT_SIZE:.5,FONT_SIZE_FIXED:20,FONT_COLOR:{index:-1,color:"#ffffff"},FONT_STYLE:{bold:!0,italic:!1,underline:!1},FONT_FAMILY:"Source Sans Pro",SIZE_BEHAVIOR:"responsive",TEXT_ALIGN:"center",COLOR:{index:-1,color:"none"},ICON_POSITION:"left",BGIMAGE_MODE:"none",BGIMAGE_POSITION:"center-center",BACKGROUND_SIZE:"auto",BACKGROUND_POSITION:"centerCenter",BORDER_RADIUS:0,BORDER_WIDTH:0},q=[{value:"image",icon:"image",label:"Image"},{value:"back",icon:"back",label:"Back"},{value:"forward",icon:"forward",label:"Forward"},{value:"history",icon:"history",label:"History"},{value:"help",icon:"help",label:"Help"},{value:"info",icon:"info",label:"Info"},{value:"text",icon:"text",label:"Text"},{value:"group",icon:"group",label:"Group"},{value:"search",icon:"search",label:"Search"},{value:"zoom-in",icon:"zoom-in",label:"Zoom in"},{value:"zoom-out",icon:"zoom-out",label:"Zoom out"},{value:"export",icon:"export",label:"Export"},{value:"import",icon:"import",label:"Import"},{value:"field",icon:"field",label:"Field"},{value:"lock",icon:"lock",label:"Lock"},{value:"unlock",icon:"unlock",label:"Unlock"},{value:"database",icon:"database",label:"Database"},{value:"calendar",icon:"calendar",label:"Calendar"},{value:"bookmark",icon:"bookmark",label:"Bookmark"},{value:"library",icon:"library",label:"Library"},{value:"star",icon:"star",label:"Star"},{value:"print",icon:"print",label:"Print"},{value:"remove",icon:"remove",label:"Remove"},{value:"handle",icon:"handle",label:"Handle"},{value:"handle-horizontal",icon:"handle-horizontal",label:"Handle horizontal"},{value:"menu",icon:"menu",label:"Menu"},{value:"list",icon:"list",label:"List"},{value:"unordered-list",icon:"unordered-list",label:"Unordered list"},{value:"clock",icon:"clock",label:"Clock"},{value:"puzzle",icon:"puzzle",label:"Puzzle"},{value:"filterpane",icon:"filterpane",label:"Filterpane"},{value:"plus",icon:"plus",label:"Plus"},{value:"minus",icon:"minus",label:"Minus"},{value:"triangle-top",icon:"triangle-top",label:"Triangle top"},{value:"triangle-bottom",icon:"triangle-bottom",label:"Triangle bottom"},{value:"triangle-left",icon:"triangle-left",label:"Triangle left"},{value:"triangle-right",icon:"triangle-right",label:"Triangle right"},{value:"tick",icon:"tick",label:"Tick"},{value:"cogwheel",icon:"cogwheel",label:"Cogwheel"},{value:"settings",icon:"settings",label:"Settings"},{value:"cut",icon:"cut",label:"Cut"},{value:"copy",icon:"copy",label:"Copy"},{value:"paste",icon:"paste",label:"Paste"},{value:"camera",icon:"camera",label:"Camera"},{value:"slide-show",icon:"slide-show",label:"Slide show"},{value:"palette",icon:"palette",label:"Palette"},{value:"shapes",icon:"shapes",label:"Shapes"},{value:"effects",icon:"effects",label:"Effects"},{value:"file",icon:"file",label:"File"},{value:"expand",icon:"expand",label:"Expand"},{value:"collapse",icon:"collapse",label:"Collapse"},{value:"bin",icon:"bin",label:"Bin"},{value:"link",icon:"link",label:"Link"},{value:"pivot",icon:"pivot",label:"Pivot"},{value:"reload",icon:"reload",label:"Reload"},{value:"add",icon:"add",label:"Add"},{value:"edit",icon:"edit",label:"Edit"},{value:"key",icon:"key",label:"Key"},{value:"box",icon:"box",label:"Box"},{value:"home",icon:"home",label:"Home"},{value:"person",icon:"person",label:"Person"},{value:"grid",icon:"grid",label:"Grid"},{value:"cloud",icon:"cloud",label:"Cloud"},{value:"more",icon:"more",label:"More"},{value:"folder",icon:"folder",label:"Folder"},{value:"drop",icon:"drop",label:"Drop"},{value:"play",icon:"play",label:"Play"},{value:"tag",icon:"tag",label:"Tag"},{value:"close",icon:"close",label:"Close"},{value:"warning",icon:"warning",label:"Warning"},{value:"warning-triangle",icon:"warning-triangle",label:"Warning triangle"},{value:"share",icon:"share",label:"Share"},{value:"top",icon:"top",label:"Top"},{value:"low-resolution",icon:"low-resolution",label:"Low resolution"},{value:"high-resolution",icon:"high-resolution",label:"High resolution"},{value:"view",icon:"view",label:"View"},{value:"control",icon:"control",label:"Control"},{value:"code",icon:"code",label:"Code"},{value:"upload",icon:"upload",label:"Upload"},{value:"repair",icon:"repair",label:"Repair"},{value:"split",icon:"split",label:"Split"},{value:"up-down",icon:"up-down",label:"Up down"},{value:"disconnect",icon:"disconnect",label:"Disconnect"},{value:"photo-library",icon:"photo-library",label:"Photo library"},{value:"application",icon:"application",label:"Application"},{value:"new-tab",icon:"new-tab",label:"New tab"},{value:"ascending",icon:"ascending",label:"Ascending"},{value:"descending",icon:"descending",label:"Descending"},{value:"arrow-up",icon:"arrow-up",label:"Arrow up"},{value:"arrow-down",icon:"arrow-down",label:"Arrow down"},{value:"arrow-right",icon:"arrow-right",label:"Arrow right"},{value:"arrow-left",icon:"arrow-left",label:"Arrow left"},{value:"sync",icon:"sync",label:"Sync"},{value:"draggable",icon:"draggable",label:"Draggable"},{value:"book",icon:"book",label:"Book"},{value:"measure",icon:"measure",label:"Measure"},{value:"download",icon:"download",label:"Download"},{value:"more-rounded",icon:"more-rounded",label:"More rounded"},{value:"align-object-left",icon:"align-object-left",label:"Align object-left"},{value:"align-object-center",icon:"align-object-center",label:"Align object-center"},{value:"align-object-right",icon:"align-object-right",label:"Align object-right"},{value:"submit",icon:"submit",label:"Submit"},{value:"operators",icon:"operators",label:"Operators"},{value:"general-data-class",icon:"general-data-class",label:"General data-class"},{value:"building",icon:"building",label:"Building"},{value:"bell",icon:"bell",label:"Bell"},{value:"unlink",icon:"unlink",label:"Unlink"},{value:"lightbulb",icon:"lightbulb",label:"Lightbulb"},{value:"log-in",icon:"log-in",label:"Log in"},{value:"log-out",icon:"log-out",label:"Log out"},{value:"previous",icon:"previous",label:"Previous"},{value:"goto",icon:"goto",label:"Goto"},{value:"save",icon:"save",label:"Save"},{value:"pause",icon:"pause",label:"Pause"},{value:"stop",icon:"stop",label:"Stop"},{value:"step-in",icon:"step-in",label:"Step in"},{value:"comment",icon:"comment",label:"Comment"},{value:"indent",icon:"indent",label:"Indent"},{value:"undent",icon:"undent",label:"Undent"},{value:"filter",icon:"filter",label:"Filter"},{value:"clear-filter",icon:"clear-filter",label:"Clear filter"},{value:"insert",icon:"insert",label:"Insert"},{value:"direction-left",icon:"direction-left",label:"Direction left"},{value:"swap",icon:"swap",label:"Swap"},{value:"bubbles",icon:"bubbles",label:"Bubbles"},{value:"sheet",icon:"sheet",label:"Sheet"},{value:"object",icon:"object",label:"Object"},{value:"clear-selections",icon:"clear-selections",label:"Clear selections"},{value:"selections-tool",icon:"selections-tool",label:"Selections tool"},{value:"selections-reload",icon:"selections-reload",label:"Selections reload"},{value:"selections-back",icon:"selections-back",label:"Selections back"},{value:"selections-forward",icon:"selections-forward",label:"Selections forward"},{value:"expression",icon:"expression",label:"Expression"},{value:"select-alternative",icon:"select-alternative",label:"Select alternative"},{value:"select-possible",icon:"select-possible",label:"Select possible"},{value:"select-excluded",icon:"select-excluded",label:"Select excluded"},{value:"select-all",icon:"select-all",label:"Select all"},{value:"bar-chart",icon:"bar-chart",label:"Bar chart"},{value:"bar-chart-horizontal",icon:"bar-chart-horizontal",label:"Bar chart-horizontal"},{value:"line-chart",icon:"line-chart",label:"Line chart"},{value:"pie-chart",icon:"pie-chart",label:"Pie chart"},{value:"gauge-chart",icon:"gauge-chart",label:"Gauge chart"},{value:"kpi",icon:"kpi",label:"Kpi"},{value:"scatter-chart",icon:"scatter-chart",label:"Scatter chart"},{value:"map",icon:"map",label:"Map"},{value:"table",icon:"table",label:"Table"},{value:"pivot-table",icon:"pivot-table",label:"Pivot table"},{value:"treemap",icon:"treemap",label:"Treemap"},{value:"combo-chart",icon:"combo-chart",label:"Combo chart"},{value:"boxplot",icon:"boxplot",label:"Boxplot"},{value:"distributionplot",icon:"distributionplot",label:"Distributionplot"},{value:"histogram",icon:"histogram",label:"Histogram"},{value:"direct-discovery",icon:"direct-discovery",label:"Direct discovery"},{value:"data-model",icon:"data-model",label:"Data model"},{value:"script",icon:"script",label:"Script"},{value:"script-ok",icon:"script-ok",label:"Script ok"},{value:"debug",icon:"debug",label:"Debug"},{value:"auto-layout",icon:"auto-layout",label:"Auto layout"}];const F={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},$={resolveExpression:e=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(t[1]/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e),t)return e;const o=e&&F[e.toLowerCase()];if(o){const e=void 0!==o.a?o.a:1;return`rgba(${o.r},${o.g},${o.b},${e})`}return"none"},getFadedColor(e){const t=.15;let o,n,a,i;if(e.length>7){o=e.split(",");const r=-1!==o[0].indexOf("a");return n=r?parseInt(o[0].slice(5),10):parseInt(o[0].slice(4),10),i=parseInt(o[1],10),a=parseInt(o[2],10),`${(r?"rgba(":"rgb(")+(Math.round((0-n)*t)+n)},${Math.round((0-i)*t)+i},${Math.round((0-a)*t)+a}${r?`,${o[3]}`:")"}`}return o=parseInt(e.slice(1),16),n=o>>16,i=o>>8&255,a=255&o,`#${(16777216+65536*(Math.round((0-n)*t)+n)+256*(Math.round((0-i)*t)+i)+(Math.round((0-a)*t)+a)).toString(16).slice(1)}`},getColor({useColorExpression:e=!1,colorExpression:t="",color:o=N.COLOR},n,a){let i;return e?i=$.resolveExpression(t):"string"==typeof o?i=o:o&&(i=a.getColorPickerColor(o)),i&&"none"!==i?i:n}},L={auto:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",fill:"100% 100%",alwaysFill:"cover",stretchFit:"100% 100%"},j={"top-left":"top left","center-left":"center left","bottom-left":"bottom left","top-center":"top center","center-center":"center center","bottom-center":"bottom center","top-right":"top right","center-right":"center right","bottom-right":"bottom right",topLeft:"0% 0%",centerLeft:"50% 0%",bottomLeft:"100% 0%",topCenter:"0% 50%",centerCenter:"50% 50%",bottomCenter:"100% 50%",topRight:"0% 100%",centerRight:"50% 100%",bottomRight:"100% 100%"},D=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],_=[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],M=[{value:"responsive",translation:"properties.responsive"},{value:"relative",translation:"properties.fluid"},{value:"fixed",translation:"properties.fixed"}],V=e=>e%1!=0?e.toFixed(2):e,R=(e,t,o,n)=>{t.offsetWidth<=e.clientWidth?o.style.overflow="visible":o.style.overflow="hidden",n&&(t.children[0].style.marginRight=`${V(.04*t.offsetWidth)}px`)},P=(e,t,o,n,a)=>{if("fixed"===t.sizeBehavior)o.style.fontSize=`${t.sizeFixed||N.FONT_SIZE_FIXED}px`,R(e,o,n,a);else if("relative"===t.sizeBehavior){const i=t.size||N.FONT_SIZE,r=40/i,l=Math.min(e.clientWidth/r*10,e.clientHeight*i*.8);o.style.fontSize=`${l}px`,R(e,o,n,a)}else{o.style.fontSize=`${e.clientHeight}px`;let n=e.clientHeight/o.offsetHeight*e.clientHeight;o.style.fontSize=`${n}px`,o.offsetWidth>e.clientWidth&&(n*=e.clientWidth/o.offsetWidth);((e,t,o,n)=>{t.style&&t.style.italic?n?(e.style.fontSize=`${V(Math.max(.84*o,8))}px`,e.children[0].style.marginRight=`${V(.04*e.offsetWidth)}px`,e.children[1].style.marginRight=`${V(.04*e.offsetWidth)}px`):(e.style.fontSize=`${V(Math.max(.9*o,8))}px`,e.children[0].style.marginRight=`${V(.02*e.offsetWidth)}px`):n?(e.style.fontSize=`${V(Math.max(.88*o,8))}px`,e.children[0].style.marginRight=`${V(.04*e.offsetWidth)}px`):e.style.fontSize=`${V(Math.max(.92*o,8))}px`})(o,t,n*(t.size||N.FONT_SIZE),a)}},z=(e,t)=>{const o=t.getDataColorSpecials().primary;return $.getColor(e,o,t)},U=(e,t)=>`${e}: ${t};`;var H={getStyles({style:e={},disabled:t,theme:o,element:n,app:a}){let i="width: 100%;height: 100%;transition: transform .1s ease-in-out;position: absolute;bottom: 0;left: 0; top: 0;right: 0;margin: auto;";const{font:r={},background:l={},border:s={}}=e;return i+=t?U("opacity",.4):U("cursor","pointer"),i+=((e,t,o,n)=>{let a="";a=n("color",$.getColor(e,t,o));const i=e.style||N.FONT_STYLE;return i.bold&&(a+=n("font-weight","bold")),i.italic&&(a+=n("font-style","italic")),a})(r,N.FONT_COLOR.color,o,U),i+=((e,t,o,n)=>{let a=n("background-color",z(e,t));if((e.useImage||"media"===e.mode)&&e.url.qStaticContentUrl){let t=e.url.qStaticContentUrl.qUrl;t&&(t=p(t,o),a+=n("background-image",`url('${t}')`),a+=n("background-size",L[e.size||N.BACKGROUND_SIZE]),a+=n("background-position",j[e.position||N.BACKGROUND_POSITION]),a+=n("background-repeat","no-repeat"))}return a})(l,o,a,U),i+=((e,t,o,n,a)=>{if(!o.useBorder)return"border: none;";let i="";const r=z(t,n),l=Math.min(e.offsetWidth,e.offsetHeight),s=$.getColor(o,$.getFadedColor(r),n);return i=a("border",`${(o.width||N.BORDER_WIDTH)*l/2}px solid ${s}`),i+=a("border-radius",(o.radius||N.BORDER_RADIUS)*l/2+"px"),i})(n,l,s,o,U),i},createLabelAndIcon({button:e,theme:t,style:o={},isSense:n}){var a;const{icon:i={},font:r={},label:l=N.LABEL,showLabel:s=!0}=o,c=document.createElement("text");c.style.whiteSpace="nowrap",c.style.fontFamily=(null==o||null===(a=o.font)||void 0===a?void 0:a.fontFamily)||t.getStyle("","","fontFamily")||N.FONT_FAMILY;const u=((e,t)=>{const o=document.createElement("span");return o.textContent=e,o.style.whiteSpace="nowrap",o.style.textOverflow="ellipsis",(null==t?void 0:t.style)&&t.style.underline&&(o.style.textDecoration="underline"),o})(l,r);c.appendChild(u);const p=n&&i.useIcon&&""!==i.iconType;let d;p&&(d=((e,t)=>{const o=document.createElement("span"),n=e.find((e=>e.label===t.iconType||e.value===t.iconType));return o.style.textDecoration="none",o.style.fontSize="inherit",o.setAttribute("class",`lui-icon lui-icon--${n?n.value:""}`),o})(q,i),"right"===(null==i?void 0:i.position)?c.appendChild(d):c.insertBefore(d,u)),e.innerHTML="",e.appendChild(c),P(e,r,c,u,p),"8px"===c.style.fontSize&&Array.from(c.children).forEach((e=>{e.style.overflow="hidden"})),c.style.margin="0 3%",c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="left"===r.align?"flex-start":"right"===r.align?"flex-end":"center",s||(c.style.height="1px",c.style.width="1px",c.style.overflow="hidden")}};var G={targets:[]};function W(e){return function(e){if(Array.isArray(e))return Z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Z(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var Y=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],K=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var X=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function J(e){var t=e.theme,o=e.translator,n=e.defaultValue,a=e.flags,i=[],r=t.getStyle("","","fontFamilies");return Array.isArray(r)&&r.length?i.push.apply(i,W(new Set([n].concat(W(r.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(n),[{value:"ThemeHeader",label:o.get("properties.themeFonts"),metaText:o.get("properties.theme"),groupHeader:!0}].concat(W(i.map((function(e){return X(e)}))),[{value:"DefaultHeader",label:o.get("properties.allFonts"),metaText:o.get("properties.default"),groupHeader:!0}],W(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?K:Y}(a).map((function(e){return X(e)}))))}function Q(e){var t=e.theme,o=e.translator,n=e.id,a=e.path,i=e.flags,r=function(){return t.getStyle(n,a,"fontFamily")};return{getDefaultValue:function(){return r()},getOptions:function(){return J({theme:t,translator:o,defaultValue:r(),flags:i})}}}var ee=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],te=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function oe(e){var t=e.theme,o=e.translator,n=e.id,a=e.path,i=function(){return t.getStyle(n,a,"fontSize")};return{getDefaultValue:function(){return i()},getOptions:function(){return function(e){var t=e.translator,o=e.defaultValue,n=[],a=e.theme.getStyle("","","fontSizes");return Array.isArray(a)&&a.length?n.push.apply(n,W(new Set([o].concat(W(a))))):n.push(o),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(W(n.map((function(e){return te(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],W(ee.map((function(e){return te(e)}))))}({theme:t,translator:o,defaultValue:i()})}}}function ne(e){var t=e.theme,o=e.translator,n=e.id,a=e.path;return{fontFamily:Q({theme:t,translator:o,id:n,path:a,flags:e.flags}),fontSize:oe({theme:t,translator:o,id:n,path:a})}}var ae,ie=Object.prototype.hasOwnProperty,re=Object.prototype.toString,le=Object.defineProperty,se=Object.getOwnPropertyDescriptor,ce=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===re.call(e)},ue=function(e){if(!e||"[object Object]"!==re.call(e))return!1;var t,o=ie.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&ie.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!n)return!1;for(t in e);return void 0===t||ie.call(e,t)},pe=function(e,t){le&&"__proto__"===t.name?le(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},de=function(e,t){if("__proto__"===t){if(!ie.call(e,t))return;if(se)return se(e,t).value}return e[t]};function ge(e,t,o){e.prototype=t.prototype=o,o.constructor=e}function be(e,t){var o=Object.create(e.prototype);for(var n in t)o[n]=t[n];return o}function he(){}ae=function e(){var t,o,n,a,i,r,l=arguments[0],s=1,c=arguments.length,u=!1;for("boolean"==typeof l&&(u=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<c;++s)if(null!=(t=arguments[s]))for(o in t)n=de(l,o),l!==(a=de(t,o))&&(u&&a&&(ue(a)||(i=ce(a)))?(i?(i=!1,r=n&&ce(n)?n:[]):r=n&&ue(n)?n:{},pe(l,{name:o,newValue:e(u,r,a)})):void 0!==a&&pe(l,{name:o,newValue:a}));return l},ae&&ae.__esModule&&Object.prototype.hasOwnProperty.call(ae,"default")&&ae.default;var fe=1/.7,me="\\s*([+-]?\\d+)\\s*",ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3,8})$/,ke=new RegExp(`^rgb\\(${me},${me},${me}\\)$`),xe=new RegExp(`^rgb\\(${ye},${ye},${ye}\\)$`),Ae=new RegExp(`^rgba\\(${me},${me},${me},${ve}\\)$`),Se=new RegExp(`^rgba\\(${ye},${ye},${ye},${ve}\\)$`),Ie=new RegExp(`^hsl\\(${ve},${ye},${ye}\\)$`),Oe=new RegExp(`^hsla\\(${ve},${ye},${ye},${ve}\\)$`),Ce={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ee(){return this.rgb().formatHex()}function Te(){return this.rgb().formatRgb()}function Be(e){var t,o;return e=(e+"").trim().toLowerCase(),(t=we.exec(e))?(o=t[1].length,t=parseInt(t[1],16),6===o?Ne(t):3===o?new Le(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===o?qe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===o?qe(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ke.exec(e))?new Le(t[1],t[2],t[3],1):(t=xe.exec(e))?new Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ae.exec(e))?qe(t[1],t[2],t[3],t[4]):(t=Se.exec(e))?qe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ie.exec(e))?Re(t[1],t[2]/100,t[3]/100,1):(t=Oe.exec(e))?Re(t[1],t[2]/100,t[3]/100,t[4]):Ce.hasOwnProperty(e)?Ne(Ce[e]):"transparent"===e?new Le(NaN,NaN,NaN,0):null}function Ne(e){return new Le(e>>16&255,e>>8&255,255&e,1)}function qe(e,t,o,n){return n<=0&&(e=t=o=NaN),new Le(e,t,o,n)}function Fe(e){return e instanceof he||(e=Be(e)),e?new Le((e=e.rgb()).r,e.g,e.b,e.opacity):new Le}function $e(e,t,o,n){return 1===arguments.length?Fe(e):new Le(e,t,o,null==n?1:n)}function Le(e,t,o,n){this.r=+e,this.g=+t,this.b=+o,this.opacity=+n}function je(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function De(){const e=_e(this.opacity);return`${1===e?"rgb(":"rgba("}${Me(this.r)}, ${Me(this.g)}, ${Me(this.b)}${1===e?")":`, ${e})`}`}function _e(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Me(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ve(e){return((e=Me(e))<16?"0":"")+e.toString(16)}function Re(e,t,o,n){return n<=0?e=t=o=NaN:o<=0||o>=1?e=t=NaN:t<=0&&(e=NaN),new ze(e,t,o,n)}function Pe(e){if(e instanceof ze)return new ze(e.h,e.s,e.l,e.opacity);if(e instanceof he||(e=Be(e)),!e)return new ze;if(e instanceof ze)return e;var t=(e=e.rgb()).r/255,o=e.g/255,n=e.b/255,a=Math.min(t,o,n),i=Math.max(t,o,n),r=NaN,l=i-a,s=(i+a)/2;return l?(r=t===i?(o-n)/l+6*(o<n):o===i?(n-t)/l+2:(t-o)/l+4,l/=s<.5?i+a:2-i-a,r*=60):l=s>0&&s<1?0:r,new ze(r,l,s,e.opacity)}function ze(e,t,o,n){this.h=+e,this.s=+t,this.l=+o,this.opacity=+n}function Ue(e){return(e=(e||0)%360)<0?e+360:e}function He(e){return Math.max(0,Math.min(1,e||0))}function Ge(e,t,o){return 255*(e<60?t+(o-t)*e/60:e<180?o:e<240?t+(o-t)*(240-e)/60:t)}ge(he,Be,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ee,formatHex:Ee,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Pe(this).formatHsl()},formatRgb:Te,toString:Te}),ge(Le,$e,be(he,{brighter(e){return e=null==e?fe:Math.pow(fe,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Le(Me(this.r),Me(this.g),Me(this.b),_e(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:je,formatHex:je,formatHex8:function(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:De,toString:De})),ge(ze,(function(e,t,o,n){return 1===arguments.length?Pe(e):new ze(e,t,o,null==n?1:n)}),be(he,{brighter(e){return e=null==e?fe:Math.pow(fe,e),new ze(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ze(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,o=this.l,n=o+(o<.5?o:1-o)*t,a=2*o-n;return new Le(Ge(e>=240?e-240:e+120,a,n),Ge(e,a,n),Ge(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new ze(Ue(this.h),He(this.s),He(this.l),_e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_e(this.opacity);return`${1===e?"hsl(":"hsla("}${Ue(this.h)}, ${100*He(this.s)}%, ${100*He(this.l)}%${1===e?")":`, ${e})`}`}}));const We=Math.PI/180,Ze=180/Math.PI,Ye=4/29,Ke=6/29,Xe=3*Ke*Ke;function Je(e){if(e instanceof Qe)return new Qe(e.l,e.a,e.b,e.opacity);if(e instanceof at)return it(e);e instanceof Le||(e=Fe(e));var t,o,n=nt(e.r),a=nt(e.g),i=nt(e.b),r=et((.2225045*n+.7168786*a+.0606169*i)/1);return n===a&&a===i?t=o=r:(t=et((.4360747*n+.3850649*a+.1430804*i)/.96422),o=et((.0139322*n+.0971045*a+.7141733*i)/.82521)),new Qe(116*r-16,500*(t-r),200*(r-o),e.opacity)}function Qe(e,t,o,n){this.l=+e,this.a=+t,this.b=+o,this.opacity=+n}function et(e){return e>.008856451679035631?Math.pow(e,1/3):e/Xe+Ye}function tt(e){return e>Ke?e*e*e:Xe*(e-Ye)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function nt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function at(e,t,o,n){this.h=+e,this.c=+t,this.l=+o,this.opacity=+n}function it(e){if(isNaN(e.h))return new Qe(e.l,0,0,e.opacity);var t=e.h*We;return new Qe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ge(Qe,(function(e,t,o,n){return 1===arguments.length?Je(e):new Qe(e,t,o,null==n?1:n)}),be(he,{brighter(e){return new Qe(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Qe(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,o=isNaN(this.b)?e:e-this.b/200;return new Le(ot(3.1338561*(t=.96422*tt(t))-1.6168667*(e=1*tt(e))-.4906146*(o=.82521*tt(o))),ot(-.9787684*t+1.9161415*e+.033454*o),ot(.0719453*t-.2289914*e+1.4052427*o),this.opacity)}})),ge(at,(function(e,t,o,n){return 1===arguments.length?function(e){if(e instanceof at)return new at(e.h,e.c,e.l,e.opacity);if(e instanceof Qe||(e=Je(e)),0===e.a&&0===e.b)return new at(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ze;return new at(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new at(e,t,o,null==n?1:n)}),be(he,{brighter(e){return new at(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new at(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return it(this).rgb()}}));var rt,lt=e=>()=>e;function st(e,t){var o=t-e;return o?function(e,t){return function(o){return e+o*t}}(e,o):lt(isNaN(e)?t:e)}function ct(e){var t=0,o=e.children,n=o&&o.length;if(n)for(;--n>=0;)t+=o[n].value;else t=1;e.value=t}function ut(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=dt)):void 0===t&&(t=pt);for(var o,n,a,i,r,l=new ht(e),s=[l];o=s.pop();)if((a=t(o.data))&&(r=(a=Array.from(a)).length))for(o.children=a,i=r-1;i>=0;--i)s.push(n=a[i]=new ht(a[i])),n.parent=o,n.depth=o.depth+1;return l.eachBefore(bt)}function pt(e){return e.children}function dt(e){return Array.isArray(e)?e[1]:null}function gt(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function bt(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function ht(e){this.data=e,this.depth=this.height=0,this.parent=null}!function e(t){var o=function(e){return 1==(e=+e)?st:function(t,o){return o-t?function(e,t,o){return e=Math.pow(e,o),t=Math.pow(t,o)-e,o=1/o,function(n){return Math.pow(e+n*t,o)}}(t,o,e):lt(isNaN(t)?o:t)}}(t);function n(e,t){var n=o((e=$e(e)).r,(t=$e(t)).r),a=o(e.g,t.g),i=o(e.b,t.b),r=st(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=a(t),e.b=i(t),e.opacity=r(t),e+""}}return n.gamma=e,n}(1),ht.prototype=ut.prototype={constructor:ht,count:function(){return this.eachAfter(ct)},each:function(e,t){let o=-1;for(const n of this)e.call(t,n,++o,this);return this},eachAfter:function(e,t){for(var o,n,a,i=this,r=[i],l=[],s=-1;i=r.pop();)if(l.push(i),o=i.children)for(n=0,a=o.length;n<a;++n)r.push(o[n]);for(;i=l.pop();)e.call(t,i,++s,this);return this},eachBefore:function(e,t){for(var o,n,a=this,i=[a],r=-1;a=i.pop();)if(e.call(t,a,++r,this),o=a.children)for(n=o.length-1;n>=0;--n)i.push(o[n]);return this},find:function(e,t){let o=-1;for(const n of this)if(e.call(t,n,++o,this))return n},sum:function(e){return this.eachAfter((function(t){for(var o=+e(t.data)||0,n=t.children,a=n&&n.length;--a>=0;)o+=n[a].value;t.value=o}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,o=function(e,t){if(e===t)return e;var o=e.ancestors(),n=t.ancestors(),a=null;for(e=o.pop(),t=n.pop();e===t;)a=e,e=o.pop(),t=n.pop();return a}(t,e),n=[t];t!==o;)t=t.parent,n.push(t);for(var a=n.length;e!==o;)n.splice(a,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(o){o!==e&&t.push({source:o.parent,target:o})})),t},copy:function(){return ut(this).eachBefore(gt)},[Symbol.iterator]:function*(){var e,t,o,n,a=this,i=[a];do{for(e=i.reverse(),i=[];a=e.pop();)if(yield a,t=a.children)for(o=0,n=t.length;o<n;++o)i.push(t[o])}while(i.length)}},rt=function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var o,n,a,i,r,l,s,c,u,p,d=e.length,g=e.search(/[0-9\-\+#]/),b=g>0?e.substring(0,g):"",h=e.split("").reverse().join(""),f=h.search(/[0-9\-\+#]/),m=d-f,v=e.substring(m,m+1),y=m+("."===v||","===v?1:0),w=f>0?e.substring(y,d):"";if(o=(t="-"===(e=e.substring(g,y)).charAt(0)?-t:+t)<0?t=-t:0,a=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(a),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=l)&&(t=(+t).toFixed(l+1)),u=e[0].split(i),e[0]=u.join(""),(r=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-r;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],s=u[1]&&u[u.length-1].length){for(h="",m=(p=t[0]).length%s,d=p.length,y=0;y<d;y++)h+=p.charAt(y),!((y-m+1)%s)&&y<d-s&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?a+t[1]:"","0"!==(n=t.join(""))&&""!==n||(o=!1),b+(o?"-":"")+n+w}},rt({exports:{}});var ft={getValue:function(e,t,o){const n=t.split(".");let a;if(void 0===e)return o;for(a=0;a<n.length;++a){if(void 0===e[n[a]])return o;e=e[n[a]]}return e}};const mt=({flags:e,theme:t,translator:o})=>{const n=function(e){var t=e.theme,o=e.translator,n=e.config,a=void 0===n?{}:n,i=e.flags,r=function(e){var t=e.config,o=void 0===t?{}:t,n=o.id,a=o.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(a)?a:[]}}({config:a}),l=r.id,s=r.paths,c={};s.forEach((function(e){for(var n=e.split("."),a=c,r=0;r<n.length;r++){var s=n[r];r===n.length-1?a[s]=ne({theme:t,translator:o,id:l,path:e,flags:i}):void 0===a[s]&&(a[s]={}),a=a[s]}}));var u=function(e){for(var t=e.split("."),o=c,n=0;n<t.length;n++){var a=t[n];if(void 0===o[a])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));o=o[a]}return o};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:t,translator:o,flags:e,config:{id:"actionButton",paths:["style.font"]}});return{items:{labelSection:{component:"panel-section",translation:"Common.Label",items:{labelItem:{items:{fontFamily:{component:"dropdown",ref:"style.font.fontFamily",options:()=>n.getOptions("style.font.fontFamily"),defaultValue:()=>n.getDefaultValue("style.font.fontFamily")},fontWrapper:{component:"inline-wrapper",type:"items",grouped:!0,items:{fontStyle:{type:"array",component:"font-style-buttons",width:!1,ref:"style.font.style",defaultValue:["bold"]},textAlign:{component:"text-align-buttons",ref:"style.font.align",defaultValue:N.TEXT_ALIGN}}},fontSizeBehavior:{component:"dropdown",ref:"style.font.sizeBehavior",translation:"properties.kpi.layoutBehavior",defaultValue:"responsive",options:M},fontSize:{component:"slider",type:"number",ref:"style.font.size",translation:"properties.fontSize",min:.2,max:1,step:.01,defaultValue:.5,show:e=>!("fixed"===ft.getValue(e,"style.font.sizeBehavior"))},fontSizeFixed:{type:"number",ref:"style.font.sizeFixed",component:"integer",translation:"properties.fontSize",min:5,defaultValue:20,option:"optional",show:e=>"fixed"===ft.getValue(e,"style.font.sizeBehavior")},fontColor:{items:{useFontColorExpression:{ref:"style.font.useColorExpression",type:"boolean",translation:"properties.fontColor",component:"dropdown",width:14,options:D},colorPicker:{type:"object",component:"color-picker",ref:"style.font.color",translation:"properties.color",defaultValue:N.FONT_COLOR,disabledNone:!0,width:12,show:e=>!ft.getValue(e,"style.font.useColorExpression")},colorExpression:{type:"string",component:"input-field-expression",ref:"style.font.colorExpression",translation:"Common.Expression",expression:"optional",show:e=>ft.getValue(e,"style.font.useColorExpression")}}}}}}},backgroundOptions:{component:"panel-section",translation:"properties.background.options",items:{backgroundColor:{type:"items",items:{useColorExpression:{type:"boolean",component:"dropdown",ref:"style.background.useColorExpression",translation:"properties.color",options:D},colorExpression:{type:"string",component:"input-field-expression",ref:"style.background.colorExpression",translation:"Common.Expression",expression:"optional",show:e=>ft.getValue(e,"style.background.useColorExpression")},colorPicker:{type:"object",component:"color-picker",ref:"style.background.color",translation:"properties.color.used",disableNone:!1,defaultValue:N.COLOR,dualOutput:!0,show:e=>!ft.getValue(e,"style.background.useColorExpression")}}},backgroundImage:{items:{backgroundImageMode:{component:"dropdown",ref:"style.background.mode",translation:"properties.backgroundImage",defaultValue:N.BGIMAGE_MODE,options:[{value:"none",translation:"Background.None"},{value:"media",translation:"MediaLibrary.Header"}],change(e){const t=e.style.background;t||(e.style.background={qStaticContentUrlDef:{}}),t.url||(e.style.background.url={})}},MediaLibrary:{component:"media-library-button",ref:"style.background.url",translation:"MediaLibrary.Header",show:e=>"media"===ft.getValue(e,"style.background.mode")},imageSize:{component:"dropdown",ref:"style.background.size",defaultValue:N.BACKGROUND_SIZE,options:[{value:"auto",translation:"properties.backgroundImage.originalSize"},{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"stretchFit",translation:"properties.backgroundImage.sizeStretch"},{value:"alwaysFill",translation:"properties.backgroundImage.sizeAlwaysFill"}],change:e=>{ft.getValue(e,"style.background.position")&&(e.style.background.position=N.BGIMAGE_POSITION)},show:e=>"media"===ft.getValue(e,"style.background.mode")&&!!ft.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")},position:{component:"position-grid",ref:"style.background.position",translation:"properties.backgroundImage.position",defaultValue:N.BGIMAGE_POSITION,show:e=>"media"===ft.getValue(e,"style.background.mode")&&ft.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")&&"stretchFit"!==ft.getValue(e,"style.background.size"),currentSizeRef:"style.background.size"}}}}},backgroundBorder:{component:"panel-section",translation:"properties.border",items:{backgroundBorderItem:{items:{useBorder:{type:"boolean",component:"switch",ref:"style.border.useBorder",translation:"properties.border.use",defaultValue:!1,options:_},borderRadius:{type:"number",component:"slider",ref:"style.border.radius",translation:"properties.border.radius",min:0,max:1,step:.01,show:e=>ft.getValue(e,"style.border.useBorder")},borderWidth:{type:"number",component:"slider",ref:"style.border.width",translation:"properties.border.width",min:0,max:.5,step:.005,show:e=>ft.getValue(e,"style.border.useBorder")},colorDropdown:{type:"string",component:"dropdown",ref:"style.border.useColorExpression",translation:"properties.border.color",options:D,show:e=>ft.getValue(e,"style.border.useBorder")},colorPicker:{type:"object",component:"color-picker",ref:"style.border.color",translation:"properties.color",defaultValue:N.COLOR,disableNone:!1,dualOutput:!0,show:e=>ft.getValue(e,"style.border.useBorder")&&!ft.getValue(e,"style.border.useColorExpression")},colorExpression:{type:"string",component:"input-field-expression",ref:"style.border.colorExpression",translation:"Common.Expression",show:e=>ft.getValue(e,"style.border.useBorder")&&ft.getValue(e,"style.border.useColorExpression"),expression:"optional"}}}}}}}},vt=e=>({type:"items",grouped:!1,translation:"properties.presentation",items:{styleEditor:{component:"styling-panel",chartTitle:"Object.ActionButton",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,...mt(e)}}}),yt=e=>({automationId:{type:"string",component:"expression-with-dropdown",translation:"Object.ActionButton.Automation",ref:"automationId",expressionType:"StringExpression",options:async()=>e(),change:async(e,t)=>{const o=await A(e,t);e.automationTriggered&&o?e.automationExecutionToken=o:e.automationExecutionToken=""}},automationLink:{translation:"Object.ActionButton.Automation.Link",component:"link",url:e=>`/automations/editor/${e.automationId}`,show:e=>e.automationId.length>1},automationPostData:{type:"boolean",ref:"automationPostData",translation:"Object.ActionButton.Automation.SendSelections",defaultValue:!1},includeSelectionsText:{translation:"Object.ActionButton.Automation.SendSelectionsHelp",component:"text"},automationTriggered:{type:"boolean",ref:"automationTriggered",translation:"Object.ActionButton.Automation.RunModeTriggered",defaultValue:!1,change:async(e,t)=>{const o=await A(e,t);e.automationTriggered&&o?e.automationExecutionToken=o:e.automationExecutionToken=""}},automationTriggeredText:{translation:"Object.ActionButton.Automation.RunModeTriggeredHelp",component:"text"},automationShowNotification:{ref:"automationShowNotification",type:"boolean",translation:"Object.ActionButton.Automation.ShowNotification",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},automationNotificationDuration:{type:"number",ref:"automationNotificationDuration",translation:"Object.ActionButton.Automation.NotificationDuration",defaultValue:4,expression:"optional",show:e=>e.automationShowNotification},automationNotificationDurationHelp:{translation:"Object.ActionButton.Automation.NotificationDurationHelp",component:"text",show:e=>e.automationShowNotification},automationOpenLinkSameWindow:{ref:"automationOpenLinkSameWindow",type:"boolean",translation:"Object.ActionButton.Automation.OpenLinkInSameWindow",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.automationShowNotification},copyBlock:{component:"button",translation:"Object.ActionButton.Automation.CopyInputBlock",action(e){navigator.clipboard.writeText(JSON.stringify((e=>{const t={blocks:[{id:"EB6A372B-3312-4E90-8E8F-88F2A889B4CF",type:"FormBlock",disabled:!1,name:"inputs",displayName:"Inputs",comment:"Inputs received from button",childId:e?"1D55D049-33EB-41CD-9EEC-3CACE5898C86":null,inputs:[],settings:[{id:"persist_data",value:"no",type:"select",structure:{}}],collapsed:[{name:"loop",isCollapsed:!1}],x:291.0010678361308,y:40.99957876441722,form:[{id:"inputs-input-0",label:"app",helpText:"null",type:"input",values:null,isRequired:!1,options:{},order:0},{id:"inputs-input-1",label:"bookmark",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:1},{id:"inputs-input-2",label:"sheet",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:2},{id:"inputs-input-3",label:"user",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:3},{id:"inputs-input-4",label:"space",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:4},{id:"inputs-input-5",label:"tenant",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:5},{id:"inputs-input-6",label:"time",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:6}],persistData:"no"}],variables:[]};return e&&t.blocks.push({id:"1D55D049-33EB-41CD-9EEC-3CACE5898C86",type:"SnippetBlock",disabled:!1,name:"applyBookmark",displayName:"Qlik Cloud Services - Apply Bookmark",comment:'Apply bookmark from button. To get selections or variables use the "Get Expression Value" block',childId:null,inputs:[{id:"d41ae430-073a-11ec-bdef-bb104839c843",value:"{$.inputs.app}",type:"string",structure:[]},{id:"d41b7e40-073a-11ec-ac1b-59270c518ae7",value:"{$.inputs.bookmark}",type:"string",structure:[]},{id:"f478e320-9270-11ed-b551-d73ebe8e14ad",value:"Yes",type:"select",displayValue:"Yes",structure:[]}],settings:[{id:"blendr_on_error",value:"stop",type:"select",structure:[]}],collapsed:[{name:"loop",isCollapsed:!1}],x:142,y:296,datasourcetype_guid:"61a87510-c7a3-11ea-95da-0fb0c241e75c",snippet_guid:"d41632d0-073a-11ec-a6ac-d34723268fbc"}),t})(e.automationPostData)))}}});function wt(e){switch(e){case"gotoSheet":return"goToSheet";case"gotoSheetById":return"goToSheetById";case"gotoStory":return"goToStory";case"switchToEdit":return"none";default:return e}}const kt=(e,t)=>{const o={qChildren:[]},n={actions:[],props:{useEnabledCondition:null,fullWidth:"auto"},qLayoutExclude:{disabled:{}},...t};return e&&"qlik-button-for-navigation"===e.properties.visualization&&Object.keys(e.properties).forEach((t=>{let o;switch(t){case"props":o=e.properties[t],n.style.label=o.buttonLabel,n.style.icon.useIcon=o.buttonShowIcon,n.style.icon.iconType=o.buttonIconLui,n.style.font.align=o.buttonTextAlign,n.useEnabledCondition=o.useEnabledCondition,n.enabledCondition=o.enabledCondition,o.actionItems&&o.actionItems.forEach((e=>{!function(e,t){const o={actionType:e.actionType,bookmark:e.selectedBookmark,field:e.selectedField,variable:e.variable,value:e.value,softLock:e.softLock,cId:e.cId};switch(e.actionType){case"clearOther":o.actionType="clearAllButThis";break;case"unlockAllAndClearAll":o.actionType="clearAll",o.softLock=!0;break;case"selectField":o.actionType="selectMatchingValues";break;case"selectAndLockField":t.actions.push({...o,cId:null,actionType:"selectMatchingValues"}),o.actionType="lockField"}t.actions.push(o)}(e,n)})),n.navigation={action:wt(o.navigationAction),sheet:"gotoSheetById"===o.navigationAction?o.sheetId:o.selectedSheet,story:o.selectedStory,websiteUrl:o.websiteUrl,sameWindow:o.sameWindow};break;case"qStateName":case"showTitles":case"title":case"subtitle":case"footnote":n[t]=e.properties[t]}})),o.qProperty=n,o};let xt=null;const At=async()=>{if(!xt){const e=await fetch("../api/v1/automations?limit=100"),t=await e.json();xt=t.data.map((e=>({value:e.id,label:e.name})))}return xt};function St({translator:e,shouldHide:t,senseNavigation:o,theme:n,isGoToChartEnabled:a}){return{definition:{type:"items",component:"accordion",items:{actions:{type:"items",translation:"Object.ActionButton.ActionsAndNavigation",grouped:!0,items:{actionArray:{type:"items",items:{actionExecution:{type:"boolean",ref:"runtimeExpressionEvaluation",translation:"Object.ActionButton.RuntimeExpressionEvaluation",show:t.isEnabled("IM-5699_RUNTIME_EXPRESSION_EVALUATION")},actions:{type:"array",translation:"Object.ActionButton.Actions",ref:"actions",itemTitleRef:t=>{if(t.actionLabel)return t.actionLabel;const o=t.actionType?"Object.ActionButton.InvalidAction":"Object.ActionButton.NewAction",n=S.find((e=>t.actionType===e.value));return e.get(n&&n.translation||o)},allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"Object.ActionButton.AddAction",items:{label:{component:"string",ref:"actionLabel",translation:"Common.Label",expression:"optional",defaultValue:""},actionType:{type:"string",ref:"actionType",component:"expression-with-dropdown",translation:"Object.ActionButton.Action",defaultValue:"",options:I(t),dropdownOnly:!0},bookmark:{type:"string",ref:"bookmark",component:"expression-with-dropdown",translation:"ExpressionEditor.SetExpresions.Bookmark",defaultValue:"",dropdownOnly:!0,options:async(e,t)=>(await t.app.getBookmarkList()).map((e=>({label:e.qData.title,value:e.qInfo.qId}))),show:e=>O(e,"bookmark")},field:{type:"string",ref:"field",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:async(e,t)=>(await t.app.getFieldList()).map((e=>({label:e.qName,value:e.qName}))),show:e=>O(e,"field")},variable:{type:"string",ref:"variable",component:"expression-with-dropdown",translation:"Common.Variable",defaultValue:"",expressionType:"StringExpression",options:async(e,t)=>(await t.app.getVariableList()).filter((t=>!t.qIsReserved||t.qIsReserved&&e.showSystemVariables)).map((e=>({label:e.qName,value:e.qName}))),show:e=>O(e,"variable")},showSystemVariables:{type:"boolean",ref:"showSystemVariables",translation:"ExpressionEditor.SystemVariables",defaultValue:!1,show:e=>O(e,"variable")},softLock:{type:"boolean",ref:"softLock",translation:"Object.ActionButton.Softlock",defaultValue:!1,show:e=>O(e,"softLock")},value:{type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:e=>O(e,"value")},partial:{type:"boolean",ref:"partial",translation:"Object.ActionButton.Partial",defaultValue:!1,show:e=>O(e,"partial")},automationProps:{type:"items",grouped:!1,items:yt(At),show:e=>O(e,"automation")},cyclicDimension:{type:"string",ref:"cyclicDimensionId",component:"expression-with-dropdown",translation:"Common.Dimension",defaultValue:"",dropdownOnly:!0,options:async(e,t)=>(await t.app.getDimensionList()).filter((e=>"C"===e.qData.grouping)).map((e=>({label:e.qMeta.title,value:e.qInfo.qId}))),show:e=>O(e,"cyclicDimension")},indexStepper:{type:"string",ref:"indexStepper",component:"expression-with-dropdown",translation:"Object.ActionButton.Step",defaultValue:1,dropdownOnly:!0,options:async()=>[{translation:"Object.ActionButton.Forward",value:1},{translation:"Object.ActionButton.Backward",value:-1}],show:e=>O(e,"indexStepper")},groupFieldIndex:{type:"integer",ref:"groupFieldIndex",component:"expression-with-dropdown",translation:"Object.ActionButton.GroupFieldIndex",defaultValue:0,dropdownOnly:!0,options:async(e,t)=>{if(!e.cyclicDimensionId)return[];const o=await t.app.getDimension(e.cyclicDimensionId);return await o.getLayout(),o.layout.qDim.qFieldDefs.map(((e,t)=>{var n;return{label:(null===(n=o.layout.qDim.qFieldLabels)||void 0===n?void 0:n[t])||e,value:t}}))},show:e=>O(e,"groupFieldIndex")&&e.cyclicDimensionId}}}}},navigation:{translation:"Object.ActionButton.Navigation",type:"items",items:{action:{ref:"navigation.action",translation:"Object.ActionButton.Navigation",component:"expression-with-dropdown",defaultValue:null,options:T(t),dropdownOnly:!0},appId:{type:"string",expression:"optional",ref:"navigation.appId",translation:"properties.appId",show:e=>B(e,"appId")},sheetId:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",expression:"optional",show:e=>B(e,"sheetId")},sheet:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",component:"expression-with-dropdown",expressionType:"StringExpression",show:e=>B(e,"sheet"),options:async(e,t)=>(await t.app.getSheetList()).map((e=>({value:e.qInfo.qId,label:e.qMeta.title,showCondition:e.qData.showCondition})))},chartId:{type:"string",ref:"navigation.chartId",translation:"properties.chartPicker.chartId",component:"expression-with-dropdown",expressionType:"StringExpression",show:e=>!!a&&B(e,"chartId"),options:async(e,t,o)=>{const n=e.navigation.sheet,a=n&&await o.app.getObject(n);return null==a?void 0:a.properties.cells.map((e=>({value:e.name})))}},story:{type:"string",ref:"navigation.story",translation:"properties.story",component:"expression-with-dropdown",expressionType:"StringExpression",show:e=>B(e,"story"),options:async(e,t)=>(await t.app.getStoryList()).map((e=>({value:e.qInfo.qId,label:e.qMeta.title})))},websiteUrl:{type:"string",expression:"optional",ref:"navigation.websiteUrl",translation:"properties.website",show:e=>B(e,"websiteUrl")},sameWindow:{type:"boolean",ref:"navigation.sameWindow",translation:"properties.sameWindow",show:e=>B(e,"sameWindow"),defaultValue:!1},odagLink:{type:"string",ref:"navigation.odagLink",component:"dropdown",translation:"ExpressionEditor.SetExpresions.OdagAppLinks",options:async(e,t)=>(await o.getOdagLinks(t.app)).filter((e=>"odaglink"===e.properties.type)).map((e=>({label:e.properties.data.name,value:e.properties.data.id}))),show:e=>B(e,"odagLink")}}}}},enableCondition:{type:"items",translation:"properties.enableConditionSection",items:{useCondition:{type:"boolean",component:"switch",translation:"properties.enableToggle",ref:"useEnabledCondition",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},condition:{ref:"enabledCondition",translation:"properties.enableCondition",type:"integer",expression:"optional",show:e=>e.useEnabledCondition}}},settings:{component:"expandable-items",translation:"Common.Appearance",uses:"settings",items:{general:{type:"items",translation:"properties.general",items:{showTitles:{},details:{show:!1},cellNavMenu:{show:!1},labelGroup:{type:"items",items:{label:{component:"string",ref:"style.label",translation:"Common.Label",expression:"optional"},showLabelToggle:{component:"switch",type:"boolean",ref:"style.showLabel",translation:"properties.referenceLines.showLabel",defaultValue:!0,options:_}}}}},icon:{type:"items",grouped:!0,translation:"properties.icon",items:{iconSettings:{type:"items",items:{useIcon:{ref:"style.icon.useIcon",type:"boolean",translation:"properties.icon.use",component:"switch",options:_},iconType:{ref:"style.icon.iconType",component:"expression-with-dropdown",translation:"properties.icon",defaultValue:"",options:q,expressionType:"StringExpression",show:e=>ft.getValue(e,"style.icon.useIcon")},iconPosition:{ref:"style.icon.position",component:"dropdown",translation:"Common.Position",options:[{translation:"properties.dock.left",value:"left"},{translation:"properties.dock.right",value:"right"}],show:e=>ft.getValue(e,"style.icon.useIcon")}}}}},presentation:vt({flags:t,theme:n,translator:e})}}}},importProperties:kt,exportProperties:null,support:{export:!1,exportData:!1,snapshot:!1,viewData:!1,quickMobile:!0,fullscreen:!1}}}const It=(t,o)=>{var n;const a=null===(n=t.style)||void 0===n||null===(n=n.background)||void 0===n?void 0:n.url;e.usePromise((async()=>{var e,t;null!=a&&null!==(e=a.qStaticContentUrl)&&void 0!==e&&e.qUrl&&await(e=>new Promise(((t,o)=>{const n=new Image;n.src=e,n.onload=()=>t("resolved"),n.onerror=()=>o(new Error(void 0))})))(p(null==a||null===(t=a.qStaticContentUrl)||void 0===t?void 0:t.qUrl,o))}),[a])},Ot={version:"1.44.2",showTitles:!0,title:"",subtitle:"",footnote:"",useEnabledCondition:!1,enabledCondition:1,actions:[],runtimeExpressionEvaluation:!1,navigation:{action:"none"},disableNavMenu:!0,showDetails:!1,style:{label:N.LABEL,showLabel:!0,font:{fontFamily:N.FONT_FAMILY,useColorExpression:!1,color:N.FONT_COLOR,colorExpression:"",size:N.FONT_SIZE,sizeFixed:N.FONT_SIZE_FIXED,sizeBehavior:N.SIZE_BEHAVIOR,style:N.FONT_STYLE,align:N.TEXT_ALIGN},background:{useColorExpression:!1,color:N.COLOR,colorExpression:"",mode:N.BGIMAGE_MODE,useImage:!1,url:{qStaticContentUrlDef:{qUrl:""}},size:N.BACKGROUND_SIZE,position:N.BACKGROUND_POSITION},border:{useColorExpression:!1,color:N.COLOR,colorExpression:"",useBorder:!1,radius:N.BORDER_RADIUS,width:N.BORDER_WIDTH},icon:{useIcon:!1,iconType:"",position:N.ICON_POSITION}}};return function(t){var o,n,a;const{sense:i={},translator:r,flags:{isEnabled:l},anything:s}=t,c=null===(o=s.sense)||void 0===o?void 0:o.isFeatureBlacklisted,u=null===(n=s.sense)||void 0===n?void 0:n.isUnsupportedFeature,p={isEnabled:l,isFeatureBlacklisted:c,isUnsupportedFeature:u},d=null==l?void 0:l("ACTION_BUTTON_IM_4975_CHART_NAVIGATION"),{navigation:g,platform:b}=i;return Ot.style.label=i?r.get("Object.ActionButton"):"Button",{qae:{properties:Ot,data:G},component(){const t=e.useElement(),o=e.useTheme();e.useMemo((()=>{const e=document.createElement("button");e.appendChild(document.createElement("text")),t.appendChild(e)}),[]);const n=e.useStaleLayout(),a=e.useModel(),i=e.useApp(),s=e.useInteractionState();It(n,i);const c=(({layout:e,theme:t,app:o,interactions:n,senseNavigation:a,platform:i,element:r,translator:l,model:s,isEnabled:c})=>{const u=!!a,p=r.firstElementChild,{style:d,qStateName:g,navigation:b}=e,h=e.useEnabledCondition&&0===e.enabledCondition,f=!h&&n.active,m=H.getStyles({style:d,disabled:h,theme:t,element:r,app:o});p.setAttribute("style",m),p.setAttribute("tabindex","-1"),H.createLabelAndIcon({button:p,theme:t,style:d,isSense:u}),p.onclick=async()=>{if(f){const t=[],{actions:n}=e;if(n.forEach((e=>{const n=S.find((t=>t.value===e.actionType));n?t.push(n.getActionCall({app:o,qStateName:g,...e,senseNavigation:a,translator:l,platform:i,isEnabled:c})):t.push((()=>{}))})),p.setAttribute("disabled",!0),await(async({actionCallList:e,model:t,layout:o,app:n})=>{const a=await t.getEffectiveProperties();for(let t=0;t<e.length;t++)if(o.runtimeExpressionEvaluation){var i,r;const o=(null===(i=a.actions[t].value)||void 0===i||null===(i=i.qStringExpression)||void 0===i?void 0:i.qExpr)&&await n.evaluate(a.actions[t].value.qStringExpression.qExpr),l=(null===(r=a.actions[t].variable)||void 0===r||null===(r=r.qStringExpression)||void 0===r?void 0:r.qExpr)&&await n.evaluate(a.actions[t].variable.qStringExpression.qExpr);await e[t](o,l)}else await e[t]()})({actionCallList:t,model:s,layout:e,app:o}),a&&!a.getCurrentStoryId()){const e=b&&E.find((e=>e.value===b.action));a&&e&&"function"==typeof e.navigationCall&&await e.navigationCall({app:o,senseNavigation:a,...b,element:r})}p.removeAttribute("disabled")}};const v=()=>{if(f){const{offsetWidth:e,offsetHeight:t}=p;p.style.transform=t>e?`scale(0.98, ${1-e/t*.02})`:`scale(${1-t/e*.02}, 0.98)`}},y=()=>{const{transform:e}=p.style;f&&""!==e&&"scale(1)"!==e&&(p.style.transform="scale(1)")};return p.onmousedown=e=>{0===e.button&&v()},p.onmouseup=y,p.onmouseleave=y,p.ontouchstart=v,p.ontouchend=y,p.ontouchcancel=y,()=>{p.onclick=void 0,p.onmousedown=void 0,p.onmouseup=void 0,p.onmouseleave=void 0,p.ontouchstart=void 0,p.ontouchend=void 0,p.ontouchcancel=void 0}})({element:t,layout:n,interactions:s,theme:o,app:i,senseNavigation:g,platform:b,translator:r,model:a,isEnabled:l});e.useEffect((()=>()=>{c()}),[t]),e.useImperativeHandle((()=>({focus(){t.firstElementChild.onclick()}})),[t])},ext:St({translator:r,shouldHide:p,senseNavigation:g,theme:null===(a=s.sense)||void 0===a?void 0:a.theme,isGoToChartEnabled:d})}}}));
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var o,n,a,i,r,l,s,c,u,p,d=e.length,g=e.search(/[0-9\-\+#]/),b=g>0?e.substring(0,g):"",h=e.split("").reverse().join(""),f=h.search(/[0-9\-\+#]/),m=d-f,v=e.substring(m,m+1),y=m+("."===v||","===v?1:0),w=f>0?e.substring(y,d):"";if(o=(t="-"===(e=e.substring(g,y)).charAt(0)?-t:+t)<0?t=-t:0,a=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(a),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=l)&&(t=(+t).toFixed(l+1)),u=e[0].split(i),e[0]=u.join(""),(r=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-r;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],s=u[1]&&u[u.length-1].length){for(h="",m=(p=t[0]).length%s,d=p.length,y=0;y<d;y++)h+=p.charAt(y),!((y-m+1)%s)&&y<d-s&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?a+t[1]:"","0"!==(n=t.join(""))&&""!==n||(o=!1),b+(o?"-":"")+n+w}},rt({exports:{}});var ft={getValue:function(e,t,o){const n=t.split(".");let a;if(void 0===e)return o;for(a=0;a<n.length;++a){if(void 0===e[n[a]])return o;e=e[n[a]]}return e}};const mt=({flags:e,theme:t,translator:o})=>{const n=function(e){var t=e.theme,o=e.translator,n=e.config,a=void 0===n?{}:n,i=e.flags,r=function(e){var t=e.config,o=void 0===t?{}:t,n=o.id,a=o.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(a)?a:[]}}({config:a}),l=r.id,s=r.paths,c={};s.forEach((function(e){for(var n=e.split("."),a=c,r=0;r<n.length;r++){var s=n[r];r===n.length-1?a[s]=ne({theme:t,translator:o,id:l,path:e,flags:i}):void 0===a[s]&&(a[s]={}),a=a[s]}}));var u=function(e){for(var t=e.split("."),o=c,n=0;n<t.length;n++){var a=t[n];if(void 0===o[a])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));o=o[a]}return o};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:t,translator:o,flags:e,config:{id:"actionButton",paths:["style.font"]}});return{items:{labelSection:{component:"panel-section",translation:"Common.Label",items:{labelItem:{items:{fontFamily:{component:"dropdown",ref:"style.font.fontFamily",options:()=>n.getOptions("style.font.fontFamily"),defaultValue:()=>n.getDefaultValue("style.font.fontFamily")},fontWrapper:{component:"inline-wrapper",type:"items",grouped:!0,items:{fontStyle:{type:"array",component:"font-style-buttons",width:!1,ref:"style.font.style",defaultValue:["bold"]},textAlign:{component:"text-align-buttons",ref:"style.font.align",defaultValue:N.TEXT_ALIGN}}},fontSizeBehavior:{component:"dropdown",ref:"style.font.sizeBehavior",translation:"properties.kpi.layoutBehavior",defaultValue:"responsive",options:M},fontSize:{component:"slider",type:"number",ref:"style.font.size",translation:"properties.fontSize",min:.2,max:1,step:.01,defaultValue:.5,show:e=>!("fixed"===ft.getValue(e,"style.font.sizeBehavior"))},fontSizeFixed:{type:"number",ref:"style.font.sizeFixed",component:"integer",translation:"properties.fontSize",min:5,defaultValue:20,option:"optional",show:e=>"fixed"===ft.getValue(e,"style.font.sizeBehavior")},fontColor:{items:{useFontColorExpression:{ref:"style.font.useColorExpression",type:"boolean",translation:"properties.fontColor",component:"dropdown",width:14,options:D},colorPicker:{type:"object",component:"color-picker",ref:"style.font.color",translation:"properties.color",defaultValue:N.FONT_COLOR,disabledNone:!0,width:12,show:e=>!ft.getValue(e,"style.font.useColorExpression")},colorExpression:{type:"string",component:"input-field-expression",ref:"style.font.colorExpression",translation:"Common.Expression",expression:"optional",show:e=>ft.getValue(e,"style.font.useColorExpression")}}}}}}},backgroundOptions:{component:"panel-section",translation:"properties.background.options",items:{backgroundColor:{type:"items",items:{useColorExpression:{type:"boolean",component:"dropdown",ref:"style.background.useColorExpression",translation:"properties.color",options:D},colorExpression:{type:"string",component:"input-field-expression",ref:"style.background.colorExpression",translation:"Common.Expression",expression:"optional",show:e=>ft.getValue(e,"style.background.useColorExpression")},colorPicker:{type:"object",component:"color-picker",ref:"style.background.color",translation:"properties.color.used",disableNone:!1,defaultValue:N.COLOR,dualOutput:!0,show:e=>!ft.getValue(e,"style.background.useColorExpression")}}},backgroundImage:{items:{backgroundImageMode:{component:"dropdown",ref:"style.background.mode",translation:"properties.backgroundImage",defaultValue:N.BGIMAGE_MODE,options:[{value:"none",translation:"Background.None"},{value:"media",translation:"MediaLibrary.Header"}],change(e){const t=e.style.background;t||(e.style.background={qStaticContentUrlDef:{}}),t.url||(e.style.background.url={})}},MediaLibrary:{component:"media-library-button",ref:"style.background.url",translation:"MediaLibrary.Header",show:e=>"media"===ft.getValue(e,"style.background.mode")},imageSize:{component:"dropdown",ref:"style.background.size",defaultValue:N.BACKGROUND_SIZE,options:[{value:"auto",translation:"properties.backgroundImage.originalSize"},{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"stretchFit",translation:"properties.backgroundImage.sizeStretch"},{value:"alwaysFill",translation:"properties.backgroundImage.sizeAlwaysFill"}],change:e=>{ft.getValue(e,"style.background.position")&&(e.style.background.position=N.BGIMAGE_POSITION)},show:e=>"media"===ft.getValue(e,"style.background.mode")&&!!ft.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")},position:{component:"position-grid",ref:"style.background.position",translation:"properties.backgroundImage.position",defaultValue:N.BGIMAGE_POSITION,show:e=>"media"===ft.getValue(e,"style.background.mode")&&ft.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")&&"stretchFit"!==ft.getValue(e,"style.background.size"),currentSizeRef:"style.background.size"}}}}},backgroundBorder:{component:"panel-section",translation:"properties.border",items:{backgroundBorderItem:{items:{useBorder:{type:"boolean",component:"switch",ref:"style.border.useBorder",translation:"properties.border.use",defaultValue:!1,options:_},borderRadius:{type:"number",component:"slider",ref:"style.border.radius",translation:"properties.border.radius",min:0,max:1,step:.01,show:e=>ft.getValue(e,"style.border.useBorder")},borderWidth:{type:"number",component:"slider",ref:"style.border.width",translation:"properties.border.width",min:0,max:.5,step:.005,show:e=>ft.getValue(e,"style.border.useBorder")},colorDropdown:{type:"string",component:"dropdown",ref:"style.border.useColorExpression",translation:"properties.border.color",options:D,show:e=>ft.getValue(e,"style.border.useBorder")},colorPicker:{type:"object",component:"color-picker",ref:"style.border.color",translation:"properties.color",defaultValue:N.COLOR,disableNone:!1,dualOutput:!0,show:e=>ft.getValue(e,"style.border.useBorder")&&!ft.getValue(e,"style.border.useColorExpression")},colorExpression:{type:"string",component:"input-field-expression",ref:"style.border.colorExpression",translation:"Common.Expression",show:e=>ft.getValue(e,"style.border.useBorder")&&ft.getValue(e,"style.border.useColorExpression"),expression:"optional"}}}}}}}},vt=e=>({type:"items",grouped:!1,translation:"properties.presentation",items:{styleEditor:{component:"styling-panel",chartTitle:"Object.ActionButton",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,...mt(e)}}}),yt=e=>({automationId:{type:"string",component:"expression-with-dropdown",translation:"Object.ActionButton.Automation",ref:"automationId",expressionType:"StringExpression",options:async()=>e(),change:async(e,t)=>{const o=await A(e,t);e.automationTriggered&&o?e.automationExecutionToken=o:e.automationExecutionToken=""}},automationLink:{translation:"Object.ActionButton.Automation.Link",component:"link",url:e=>`/automations/editor/${e.automationId}`,show:e=>e.automationId.length>1},automationPostData:{type:"boolean",ref:"automationPostData",translation:"Object.ActionButton.Automation.SendSelections",defaultValue:!1},includeSelectionsText:{translation:"Object.ActionButton.Automation.SendSelectionsHelp",component:"text"},automationTriggered:{type:"boolean",ref:"automationTriggered",translation:"Object.ActionButton.Automation.RunModeTriggered",defaultValue:!1,change:async(e,t)=>{const o=await A(e,t);e.automationTriggered&&o?e.automationExecutionToken=o:e.automationExecutionToken=""}},automationTriggeredText:{translation:"Object.ActionButton.Automation.RunModeTriggeredHelp",component:"text"},automationShowNotification:{ref:"automationShowNotification",type:"boolean",translation:"Object.ActionButton.Automation.ShowNotification",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},automationNotificationDuration:{type:"number",ref:"automationNotificationDuration",translation:"Object.ActionButton.Automation.NotificationDuration",defaultValue:4,expression:"optional",show:e=>e.automationShowNotification},automationNotificationDurationHelp:{translation:"Object.ActionButton.Automation.NotificationDurationHelp",component:"text",show:e=>e.automationShowNotification},automationOpenLinkSameWindow:{ref:"automationOpenLinkSameWindow",type:"boolean",translation:"Object.ActionButton.Automation.OpenLinkInSameWindow",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.automationShowNotification},copyBlock:{component:"button",translation:"Object.ActionButton.Automation.CopyInputBlock",action(e){navigator.clipboard.writeText(JSON.stringify((e=>{const t={blocks:[{id:"EB6A372B-3312-4E90-8E8F-88F2A889B4CF",type:"FormBlock",disabled:!1,name:"inputs",displayName:"Inputs",comment:"Inputs received from button",childId:e?"1D55D049-33EB-41CD-9EEC-3CACE5898C86":null,inputs:[],settings:[{id:"persist_data",value:"no",type:"select",structure:{}}],collapsed:[{name:"loop",isCollapsed:!1}],x:291.0010678361308,y:40.99957876441722,form:[{id:"inputs-input-0",label:"app",helpText:"null",type:"input",values:null,isRequired:!1,options:{},order:0},{id:"inputs-input-1",label:"bookmark",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:1},{id:"inputs-input-2",label:"sheet",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:2},{id:"inputs-input-3",label:"user",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:3},{id:"inputs-input-4",label:"space",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:4},{id:"inputs-input-5",label:"tenant",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:5},{id:"inputs-input-6",label:"time",helpText:null,type:"input",values:null,isRequired:!1,options:{},order:6}],persistData:"no"}],variables:[]};return e&&t.blocks.push({id:"1D55D049-33EB-41CD-9EEC-3CACE5898C86",type:"SnippetBlock",disabled:!1,name:"applyBookmark",displayName:"Qlik Cloud Services - Apply Bookmark",comment:'Apply bookmark from button. To get selections or variables use the "Get Expression Value" block',childId:null,inputs:[{id:"d41ae430-073a-11ec-bdef-bb104839c843",value:"{$.inputs.app}",type:"string",structure:[]},{id:"d41b7e40-073a-11ec-ac1b-59270c518ae7",value:"{$.inputs.bookmark}",type:"string",structure:[]},{id:"f478e320-9270-11ed-b551-d73ebe8e14ad",value:"Yes",type:"select",displayValue:"Yes",structure:[]}],settings:[{id:"blendr_on_error",value:"stop",type:"select",structure:[]}],collapsed:[{name:"loop",isCollapsed:!1}],x:142,y:296,datasourcetype_guid:"61a87510-c7a3-11ea-95da-0fb0c241e75c",snippet_guid:"d41632d0-073a-11ec-a6ac-d34723268fbc"}),t})(e.automationPostData)))}}});function wt(e){switch(e){case"gotoSheet":return"goToSheet";case"gotoSheetById":return"goToSheetById";case"gotoStory":return"goToStory";case"switchToEdit":return"none";default:return e}}const kt=(e,t)=>{const o={qChildren:[]},n={actions:[],props:{useEnabledCondition:null,fullWidth:"auto"},qLayoutExclude:{disabled:{}},...t};return e&&"qlik-button-for-navigation"===e.properties.visualization&&Object.keys(e.properties).forEach((t=>{let o;switch(t){case"props":o=e.properties[t],n.style.label=o.buttonLabel,n.style.icon.useIcon=o.buttonShowIcon,n.style.icon.iconType=o.buttonIconLui,n.style.font.align=o.buttonTextAlign,n.useEnabledCondition=o.useEnabledCondition,n.enabledCondition=o.enabledCondition,o.actionItems&&o.actionItems.forEach((e=>{!function(e,t){const o={actionType:e.actionType,bookmark:e.selectedBookmark,field:e.selectedField,variable:e.variable,value:e.value,softLock:e.softLock,cId:e.cId};switch(e.actionType){case"clearOther":o.actionType="clearAllButThis";break;case"unlockAllAndClearAll":o.actionType="clearAll",o.softLock=!0;break;case"selectField":o.actionType="selectMatchingValues";break;case"selectAndLockField":t.actions.push({...o,cId:null,actionType:"selectMatchingValues"}),o.actionType="lockField"}t.actions.push(o)}(e,n)})),n.navigation={action:wt(o.navigationAction),sheet:"gotoSheetById"===o.navigationAction?o.sheetId:o.selectedSheet,story:o.selectedStory,websiteUrl:o.websiteUrl,sameWindow:o.sameWindow};break;case"qStateName":case"showTitles":case"title":case"subtitle":case"footnote":n[t]=e.properties[t]}})),o.qProperty=n,o};let xt=null;const At=async()=>{if(!xt){const e=await fetch("../api/v1/automations?limit=100"),t=await e.json();xt=t.data.map((e=>({value:e.id,label:e.name})))}return xt};function St({translator:e,shouldHide:t,senseNavigation:o,theme:n,isGoToChartEnabled:a}){return{definition:{type:"items",component:"accordion",items:{actions:{type:"items",translation:"Object.ActionButton.ActionsAndNavigation",grouped:!0,items:{actionArray:{type:"items",items:{actionExecution:{type:"boolean",ref:"runtimeExpressionEvaluation",translation:"Object.ActionButton.RuntimeExpressionEvaluation",show:t.isEnabled("IM-5699_RUNTIME_EXPRESSION_EVALUATION")},actions:{type:"array",translation:"Object.ActionButton.Actions",ref:"actions",itemTitleRef:t=>{if(t.actionLabel)return t.actionLabel;const o=t.actionType?"Object.ActionButton.InvalidAction":"Object.ActionButton.NewAction",n=S.find((e=>t.actionType===e.value));return e.get(n&&n.translation||o)},allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"Object.ActionButton.AddAction",items:{label:{component:"string",ref:"actionLabel",translation:"Common.Label",expression:"optional",defaultValue:""},actionType:{type:"string",ref:"actionType",component:"expression-with-dropdown",translation:"Object.ActionButton.Action",defaultValue:"",options:I(t),dropdownOnly:!0},bookmark:{type:"string",ref:"bookmark",component:"expression-with-dropdown",translation:"ExpressionEditor.SetExpresions.Bookmark",defaultValue:"",dropdownOnly:!0,options:async(e,t)=>(await t.app.getBookmarkList()).map((e=>({label:e.qData.title,value:e.qInfo.qId}))),show:e=>O(e,"bookmark")},field:{type:"string",ref:"field",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:async(e,t)=>(await t.app.getFieldList()).map((e=>({label:e.qName,value:e.qName}))),show:e=>O(e,"field")},variable:{type:"string",ref:"variable",component:"expression-with-dropdown",translation:"Common.Variable",defaultValue:"",expressionType:"StringExpression",options:async(e,t)=>(await t.app.getVariableList()).filter((t=>!t.qIsReserved||t.qIsReserved&&e.showSystemVariables)).map((e=>({label:e.qName,value:e.qName}))),show:e=>O(e,"variable")},showSystemVariables:{type:"boolean",ref:"showSystemVariables",translation:"ExpressionEditor.SystemVariables",defaultValue:!1,show:e=>O(e,"variable")},softLock:{type:"boolean",ref:"softLock",translation:"Object.ActionButton.Softlock",defaultValue:!1,show:e=>O(e,"softLock")},value:{type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:e=>O(e,"value")},partial:{type:"boolean",ref:"partial",translation:"Object.ActionButton.Partial",defaultValue:!1,show:e=>O(e,"partial")},automationProps:{type:"items",grouped:!1,items:yt(At),show:e=>O(e,"automation")},cyclicDimension:{type:"string",ref:"cyclicDimensionId",component:"expression-with-dropdown",translation:"Common.Dimension",defaultValue:"",dropdownOnly:!0,options:async(e,t)=>(await t.app.getDimensionList()).filter((e=>"C"===e.qData.grouping)).map((e=>({label:e.qMeta.title,value:e.qInfo.qId}))),show:e=>O(e,"cyclicDimension")},indexStepper:{type:"string",ref:"indexStepper",component:"expression-with-dropdown",translation:"Object.ActionButton.Step",defaultValue:1,dropdownOnly:!0,options:async()=>[{translation:"Object.ActionButton.Forward",value:1},{translation:"Object.ActionButton.Backward",value:-1}],show:e=>O(e,"indexStepper")},groupFieldIndex:{type:"integer",ref:"groupFieldIndex",component:"expression-with-dropdown",translation:"Object.ActionButton.GroupFieldIndex",defaultValue:0,dropdownOnly:!0,options:async(e,t)=>{if(!e.cyclicDimensionId)return[];const o=await t.app.getDimension(e.cyclicDimensionId);return await o.getLayout(),o.layout.qDim.qFieldDefs.map(((e,t)=>{var n;return{label:(null===(n=o.layout.qDim.qFieldLabels)||void 0===n?void 0:n[t])||e,value:t}}))},show:e=>O(e,"groupFieldIndex")&&e.cyclicDimensionId}}}}},navigation:{translation:"Object.ActionButton.Navigation",type:"items",items:{action:{ref:"navigation.action",translation:"Object.ActionButton.Navigation",component:"expression-with-dropdown",defaultValue:null,options:T(t),dropdownOnly:!0},appId:{type:"string",expression:"optional",ref:"navigation.appId",translation:"properties.appId",show:e=>B(e,"appId")},sheetId:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",expression:"optional",show:e=>B(e,"sheetId")},sheet:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",component:"expression-with-dropdown",expressionType:"StringExpression",show:e=>B(e,"sheet"),options:async(e,t)=>(await t.app.getSheetList()).map((e=>({value:e.qInfo.qId,label:e.qMeta.title,showCondition:e.qData.showCondition})))},chartId:{type:"string",ref:"navigation.chartId",translation:"properties.chartPicker.chartId",component:"expression-with-dropdown",expressionType:"StringExpression",show:e=>!!a&&B(e,"chartId"),options:async(e,t,o)=>{const n=e.navigation.sheet,a=n&&await o.app.getObject(n);return null==a?void 0:a.properties.cells.map((e=>({value:e.name})))}},story:{type:"string",ref:"navigation.story",translation:"properties.story",component:"expression-with-dropdown",expressionType:"StringExpression",show:e=>B(e,"story"),options:async(e,t)=>(await t.app.getStoryList()).map((e=>({value:e.qInfo.qId,label:e.qMeta.title})))},websiteUrl:{type:"string",expression:"optional",ref:"navigation.websiteUrl",translation:"properties.website",show:e=>B(e,"websiteUrl")},sameWindow:{type:"boolean",ref:"navigation.sameWindow",translation:"properties.sameWindow",show:e=>B(e,"sameWindow"),defaultValue:!1},odagLink:{type:"string",ref:"navigation.odagLink",component:"dropdown",translation:"ExpressionEditor.SetExpresions.OdagAppLinks",options:async(e,t)=>(await o.getOdagLinks(t.app)).filter((e=>"odaglink"===e.properties.type)).map((e=>({label:e.properties.data.name,value:e.properties.data.id}))),show:e=>B(e,"odagLink")}}}}},enableCondition:{type:"items",translation:"properties.enableConditionSection",items:{useCondition:{type:"boolean",component:"switch",translation:"properties.enableToggle",ref:"useEnabledCondition",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},condition:{ref:"enabledCondition",translation:"properties.enableCondition",type:"integer",expression:"optional",show:e=>e.useEnabledCondition}}},settings:{component:"expandable-items",translation:"Common.Appearance",uses:"settings",items:{general:{type:"items",translation:"properties.general",items:{showTitles:{},details:{show:!1},cellNavMenu:{show:!1},labelGroup:{type:"items",items:{label:{component:"string",ref:"style.label",translation:"Common.Label",expression:"optional"},showLabelToggle:{component:"switch",type:"boolean",ref:"style.showLabel",translation:"properties.referenceLines.showLabel",defaultValue:!0,options:_}}}}},icon:{type:"items",grouped:!0,translation:"properties.icon",items:{iconSettings:{type:"items",items:{useIcon:{ref:"style.icon.useIcon",type:"boolean",translation:"properties.icon.use",component:"switch",options:_},iconType:{ref:"style.icon.iconType",component:"expression-with-dropdown",translation:"properties.icon",defaultValue:"",options:q,expressionType:"StringExpression",show:e=>ft.getValue(e,"style.icon.useIcon")},iconPosition:{ref:"style.icon.position",component:"dropdown",translation:"Common.Position",options:[{translation:"properties.dock.left",value:"left"},{translation:"properties.dock.right",value:"right"}],show:e=>ft.getValue(e,"style.icon.useIcon")}}}}},presentation:vt({flags:t,theme:n,translator:e})}}}},importProperties:kt,exportProperties:null,support:{export:!1,exportData:!1,snapshot:!1,viewData:!1,quickMobile:!0,fullscreen:!1}}}const It=(t,o)=>{var n;const a=null===(n=t.style)||void 0===n||null===(n=n.background)||void 0===n?void 0:n.url;e.usePromise((async()=>{var e,t;null!=a&&null!==(e=a.qStaticContentUrl)&&void 0!==e&&e.qUrl&&await(e=>new Promise(((t,o)=>{const n=new Image;n.src=e,n.onload=()=>t("resolved"),n.onerror=()=>o(new Error(void 0))})))(p(null==a||null===(t=a.qStaticContentUrl)||void 0===t?void 0:t.qUrl,o))}),[a])},Ot={version:"1.44.3",showTitles:!0,title:"",subtitle:"",footnote:"",useEnabledCondition:!1,enabledCondition:1,actions:[],runtimeExpressionEvaluation:!1,navigation:{action:"none"},disableNavMenu:!0,showDetails:!1,style:{label:N.LABEL,showLabel:!0,font:{fontFamily:N.FONT_FAMILY,useColorExpression:!1,color:N.FONT_COLOR,colorExpression:"",size:N.FONT_SIZE,sizeFixed:N.FONT_SIZE_FIXED,sizeBehavior:N.SIZE_BEHAVIOR,style:N.FONT_STYLE,align:N.TEXT_ALIGN},background:{useColorExpression:!1,color:N.COLOR,colorExpression:"",mode:N.BGIMAGE_MODE,useImage:!1,url:{qStaticContentUrlDef:{qUrl:""}},size:N.BACKGROUND_SIZE,position:N.BACKGROUND_POSITION},border:{useColorExpression:!1,color:N.COLOR,colorExpression:"",useBorder:!1,radius:N.BORDER_RADIUS,width:N.BORDER_WIDTH},icon:{useIcon:!1,iconType:"",position:N.ICON_POSITION}}};return function(t){var o,n,a;const{sense:i={},translator:r,flags:{isEnabled:l},anything:s}=t,c=null===(o=s.sense)||void 0===o?void 0:o.isFeatureBlacklisted,u=null===(n=s.sense)||void 0===n?void 0:n.isUnsupportedFeature,p={isEnabled:l,isFeatureBlacklisted:c,isUnsupportedFeature:u},d=null==l?void 0:l("ACTION_BUTTON_IM_4975_CHART_NAVIGATION"),{navigation:g,platform:b}=i;return Ot.style.label=i?r.get("Object.ActionButton"):"Button",{qae:{properties:Ot,data:G},component(){const t=e.useElement(),o=e.useTheme();e.useMemo((()=>{const e=document.createElement("button");e.appendChild(document.createElement("text")),t.appendChild(e)}),[]);const n=e.useStaleLayout(),a=e.useModel(),i=e.useApp(),s=e.useInteractionState();It(n,i);const c=(({layout:e,theme:t,app:o,interactions:n,senseNavigation:a,platform:i,element:r,translator:l,model:s,isEnabled:c})=>{const u=!!a,p=r.firstElementChild,{style:d,qStateName:g,navigation:b}=e,h=e.useEnabledCondition&&0===e.enabledCondition,f=!h&&n.active,m=H.getStyles({style:d,disabled:h,theme:t,element:r,app:o});p.setAttribute("style",m),p.setAttribute("tabindex","-1"),H.createLabelAndIcon({button:p,theme:t,style:d,isSense:u}),p.onclick=async()=>{if(f){const t=[],{actions:n}=e;if(n.forEach((e=>{const n=S.find((t=>t.value===e.actionType));n?t.push(n.getActionCall({app:o,qStateName:g,...e,senseNavigation:a,translator:l,platform:i,isEnabled:c})):t.push((()=>{}))})),p.setAttribute("disabled",!0),await(async({actionCallList:e,model:t,layout:o,app:n})=>{const a=await t.getEffectiveProperties();for(let t=0;t<e.length;t++)if(o.runtimeExpressionEvaluation){var i,r;const o=(null===(i=a.actions[t].value)||void 0===i||null===(i=i.qStringExpression)||void 0===i?void 0:i.qExpr)&&await n.evaluate(a.actions[t].value.qStringExpression.qExpr),l=(null===(r=a.actions[t].variable)||void 0===r||null===(r=r.qStringExpression)||void 0===r?void 0:r.qExpr)&&await n.evaluate(a.actions[t].variable.qStringExpression.qExpr);await e[t](o,l)}else await e[t]()})({actionCallList:t,model:s,layout:e,app:o}),a&&!a.getCurrentStoryId()){const e=b&&E.find((e=>e.value===b.action));a&&e&&"function"==typeof e.navigationCall&&await e.navigationCall({app:o,senseNavigation:a,...b,element:r})}p.removeAttribute("disabled")}};const v=()=>{if(f){const{offsetWidth:e,offsetHeight:t}=p;p.style.transform=t>e?`scale(0.98, ${1-e/t*.02})`:`scale(${1-t/e*.02}, 0.98)`}},y=()=>{const{transform:e}=p.style;f&&""!==e&&"scale(1)"!==e&&(p.style.transform="scale(1)")};return p.onmousedown=e=>{0===e.button&&v()},p.onmouseup=y,p.onmouseleave=y,p.ontouchstart=v,p.ontouchend=y,p.ontouchcancel=y,()=>{p.onclick=void 0,p.onmousedown=void 0,p.onmouseup=void 0,p.onmouseleave=void 0,p.ontouchstart=void 0,p.ontouchend=void 0,p.ontouchcancel=void 0}})({element:t,layout:n,interactions:s,theme:o,app:i,senseNavigation:g,platform:b,translator:r,model:a,isEnabled:l});e.useEffect((()=>()=>{c()}),[t]),e.useImperativeHandle((()=>({focus(){t.firstElementChild.onclick()}})),[t])},ext:St({translator:r,shouldHide:p,senseNavigation:g,theme:null===(a=s.sense)||void 0===a?void 0:a.theme,isGoToChartEnabled:d})}}}));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sn-action-button",
3
- "version": "1.44.2",
3
+ "version": "1.44.3",
4
4
  "description": "Action button supernova",
5
5
  "author": "QlikTech International AB",
6
6
  "icon": "extension",