(()=>{var e={55:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=0;t.IS_UNIQUE="__DO_NOT_DEDUPE_STYLE__";for(var i=/[A-Z]/g,s=/^ms-/,a=/&/g,l=/[ !#$%&()*+,./;<=>?@[\]^`{|}~"'\\]/g,c=function(e){return"-"+e.toLowerCase()},u={"animation-iteration-count":!0,"border-image-outset":!0,"border-image-slice":!0,"border-image-width":!0,"box-flex":!0,"box-flex-group":!0,"box-ordinal-group":!0,"column-count":!0,columns:!0,"counter-increment":!0,"counter-reset":!0,flex:!0,"flex-grow":!0,"flex-positive":!0,"flex-shrink":!0,"flex-negative":!0,"flex-order":!0,"font-weight":!0,"grid-area":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-span":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-span":!0,"grid-row-start":!0,"line-clamp":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"tab-size":!0,widows:!0,"z-index":!0,zoom:!0,"fill-opacity":!0,"flood-opacity":!0,"stop-opacity":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,"stroke-miterlimit":!0,"stroke-opacity":!0,"stroke-width":!0},d=0,h=Object.keys(u);d<h.length;d++)for(var g=h[d],p=0,f=["-webkit-","-ms-","-moz-","-o-",""];p<f.length;p++)u[f[p]+g]=!0;function m(e){return e.replace(i,c).replace(s,"-ms-")}function v(e){for(var t=5381,n=e.length;n--;)t=33*t^e.charCodeAt(n);return(t>>>0).toString(36)}function y(e,t){return"number"!=typeof t||0===t||u.hasOwnProperty(e)?e+":"+t:e+":"+t+"px"}function w(e){return e.sort((function(e,t){return e[0]>t[0]?1:-1}))}function b(e){return e.map((function(e){var t=e[0],n=e[1];return Array.isArray(n)?n.map((function(e){return y(t,e)})).join(";"):y(t,n)})).join(";")}function S(e,t){return-1===e.indexOf("&")?t+" "+e:e.replace(a,t)}function E(e,n,r,o,i){var s=function(e,n){for(var r=[],o=[],i=!1,s=0,a=Object.keys(e);s<a.length;s++){var l=a[s],c=e[l];null!=c&&(l===t.IS_UNIQUE?i=!0:"object"!=typeof c||Array.isArray(c)?r.push([m(l.trim()),c]):o.push([l.trim(),c]))}return{style:b(w(r)),nested:n?o:w(o),isUnique:i}}(n,""!==e),a=s.style,l=s.nested,c=s.isUnique,u=a;if(64===e.charCodeAt(0)){var d={selector:e,styles:[],rules:[],style:i?"":a};r.push(d),a&&i&&d.styles.push({selector:i,style:a,isUnique:c});for(var h=0,g=l;h<g.length;h++){var p=g[h];u+=(x=p[0])+E(x,p[1],d.rules,d.styles,i)}}else{var f=i?S(e,i):e;a&&o.push({selector:f,style:a,isUnique:c});for(var v=0,y=l;v<y.length;v++){var x,k=y[v];u+=(x=k[0])+E(x,k[1],r,o,f)}}return u}function x(e,t,n,r,i,s){for(var a=0,l=r;a<l.length;a++){var c=l[a],u=c.selector,d=c.style,h=c.isUnique,g=s?S(u,i):u,p=h?"u\0"+(++o).toString(36):"s\0"+t+"\0"+d;(v=new I(d,p)).add(new T(g,"k\0"+t+"\0"+g)),e.add(v)}for(var f=0,m=n;f<m.length;f++){var v,y=m[f],w=(u=y.selector,d=y.style,y.rules),b=y.styles;x(v=new $(u,d,"r\0"+t+"\0"+u+"\0"+d),t,w,b,i,s),e.add(v)}}function k(e){for(var t="",n=0;n<e.length;n++)t+=e[n];return t}t.escape=function(e){return e.replace(l,"\\$&")},t.hyphenate=m,t.stringHash=v;var C={add:function(){},change:function(){},remove:function(){}},R=function(){function e(e){void 0===e&&(e=C),this.changes=e,this.sheet=[],this.changeId=0,this._keys=[],this._children=Object.create(null),this._counters=Object.create(null)}return e.prototype.add=function(t){var n=this._counters[t.id]||0,r=this._children[t.id]||t.clone();if(this._counters[t.id]=n+1,0===n)this._children[r.id]=r,this._keys.push(r.id),this.sheet.push(r.getStyles()),this.changeId++,this.changes.add(r,this._keys.length-1);else if(r instanceof e&&t instanceof e){var o=this._keys.indexOf(t.id),i=r.changeId;r.merge(t),r.changeId!==i&&(this.sheet.splice(o,1,r.getStyles()),this.changeId++,this.changes.change(r,o,o))}return r},e.prototype.remove=function(t){var n=this._counters[t.id];if(void 0!==n&&n>0){this._counters[t.id]=n-1;var r=this._children[t.id],o=this._keys.indexOf(r.id);if(1===n)delete this._counters[t.id],delete this._children[t.id],this._keys.splice(o,1),this.sheet.splice(o,1),this.changeId++,this.changes.remove(r,o);else if(r instanceof e&&t instanceof e){var i=r.changeId;r.unmerge(t),r.changeId!==i&&(this.sheet.splice(o,1,r.getStyles()),this.changeId++,this.changes.change(r,o,o))}}},e.prototype.values=function(){var e=this;return this._keys.map((function(t){return e._children[t]}))},e.prototype.merge=function(e){for(var t=0,n=e.values();t<n.length;t++){var r=n[t];this.add(r)}return this},e.prototype.unmerge=function(e){for(var t=0,n=e.values();t<n.length;t++){var r=n[t];this.remove(r)}return this},e.prototype.clone=function(){return(new e).merge(this)},e}();t.Cache=R;var T=function(){function e(e,t){this.selector=e,this.id=t}return e.prototype.getStyles=function(){return this.selector},e.prototype.clone=function(){return new e(this.selector,this.id)},e}();t.Selector=T;var I=function(e){function t(t,n){var r=e.call(this)||this;return r.style=t,r.id=n,r}return r(t,e),t.prototype.getStyles=function(){return this.sheet.join(",")+"{"+this.style+"}"},t.prototype.clone=function(){return new t(this.style,this.id).merge(this)},t}(R);t.Style=I;var $=function(e){function t(t,n,r){var o=e.call(this)||this;return o.rule=t,o.style=n,o.id=r,o}return r(t,e),t.prototype.getStyles=function(){return this.rule+"{"+this.style+k(this.sheet)+"}"},t.prototype.clone=function(){return new t(this.rule,this.style,this.id).merge(this)},t}(R);t.Rule=$;var P=function(e){function n(t,n,r,o){var i=e.call(this,o)||this;return i.hash=t,i.debug=n,i.id=r,i}return r(n,e),n.prototype.registerStyle=function(e,n){var r=[],o=[],i=E("&",e,r,o),s="f"+this.hash(i),a=this.debug&&n?n+"_"+s:s;return x(this,i,r,o,"."+t.escape(a),!0),a},n.prototype.registerKeyframes=function(e,t){return this.registerHashRule("@keyframes",e,t)},n.prototype.registerHashRule=function(e,n,r){var o=[],i=[],s=E("",n,o,i),a="f"+this.hash(s),l=this.debug&&r?r+"_"+a:a,c=new $(e+" "+t.escape(l),"","h\0"+s+"\0"+e);return x(c,s,o,i,"",!1),this.add(c),l},n.prototype.registerRule=function(e,t){var n=[],r=[];x(this,E(e,t,n,r),n,r,"",!1)},n.prototype.registerCss=function(e){return this.registerRule("",e)},n.prototype.getStyles=function(){return k(this.sheet)},n.prototype.clone=function(){return new n(this.hash,this.debug,this.id,this.changes).merge(this)},n}(R);t.FreeStyle=P,t.create=function(e,t,n){return void 0===e&&(e=v),void 0===t&&(t="undefined"!=typeof process&&!1),void 0===n&&(n=C),new P(e,t,"f"+(++o).toString(36),n)}},970:e=>{!function(){var t=new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$","i");function n(e){for(var t="",n=0;n<e;n++)t+=(65536*(1+Math.random())|0).toString(16).substring(1);return t}function r(e){if(!e)throw new TypeError("Invalid argument; `value` has no value.");this.value=r.EMPTY,e&&e instanceof r?this.value=e.toString():e&&"[object String]"===Object.prototype.toString.call(e)&&r.isGuid(e)&&(this.value=e),this.equals=function(e){return r.isGuid(e)&&this.value==e},this.isEmpty=function(){return this.value===r.EMPTY},this.toString=function(){return this.value},this.toJSON=function(){return this.value}}r.EMPTY="00000000-0000-0000-0000-000000000000",r.isGuid=function(e){return e&&(e instanceof r||t.test(e.toString()))},r.create=function(){return new r([n(2),n(1),n(1),n(1),n(3)].join("-"))},r.raw=function(){return[n(2),n(1),n(1),n(1),n(3)].join("-")},e.exports?e.exports=r:"undefined"!=typeof window&&(window.Guid=r)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{EptBreakdownMetricNames:()=>D,LocalMetricsContext:()=>j,LocalWebClientMetricsLogger:()=>w,MetricsContext:()=>O,MetricsEvent:()=>E,MetricsEventParameters:()=>b,MetricsEventType:()=>v,MetricsSuites:()=>m,SessionRoute:()=>Re,VizqlPaths:()=>Ue,closeEptMetricsContext:()=>X,createContext:()=>T,fireScriptReady:()=>ie,fireViewerBootstrapLoaded:()=>re,getContextIdThenIncrement:()=>P,getDuringEptFlag:()=>V,getEptBreakdownMetricsContexts:()=>Q,getFriendlyEventDescription:()=>f,getMetricsParameterShortName:()=>S,getMetricsSuitesFilter:()=>z,getOffsetFromTimeOrigin:()=>Y,getSizeConstraints:()=>yt,getUniqueKey:()=>J,handleJQueryXhrError:()=>Ce,handleXhrError:()=>ke,logMetricsEvent:()=>$,markEptMetricsEvent:()=>Z,onViewerBootstrapLoaded:()=>ne,onVqlScriptReady:()=>oe,openEptMetricsContext:()=>G,parseTsConfigFromPage:()=>kt,setDuringEptFlag:()=>F,setMetricsEventLoggers:()=>B,setMetricsSuitesFilter:()=>M,vizqlStorage:()=>St});var e=n(970);function t(e){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}function o(){return new Promise(((e,n)=>{t((()=>{const t=i(document);t?e(t):n(new Error("Failed to parse staticConfig from document"))}))}))}function i(e){const t=e.getElementById("staticConfigContainer");if(t){const e=t.textContent;if(e)return JSON.parse(e)}return null}function s(e){var t;return(null===(t=i(e))||void 0===t?void 0:t.isAuthoring)||null}function a(e){var t;return(null===(t=i(e))||void 0===t?void 0:t.isMobile)||null}function l(e){var t;return(null===(t=i(e))||void 0===t?void 0:t.isJsDebug)||null}function c(e){var t;return(null===(t=i(e))||void 0===t?void 0:t.isPublic)||null}function u(e){var t;return(null===(t=i(e))||void 0===t?void 0:t.isSalesforceNative)||null}function d(e){var t;return e&&(null===(t=i(e))||void 0===t?void 0:t.showPagePathPrefix)||null}function h(e){var t;return e&&(null===(t=i(e))||void 0===t?void 0:t.vizqlPrefix)||null}function g(e,t=!1){const n=new URL(document.URL),r=e.toLowerCase();for(const[e,t]of n.searchParams.entries())if(r===e.toLowerCase())return/^(1|true|t|yes|y)$/.test(t.toLowerCase());return t}const p={BTSTRP:"Bootstrap Request",PROPRI:"Process Primary Payload",PROSEC:"Process Secondary Payload",MDLINI:"Initialize Models",MDLEVT:"Handle Model Events",EXELOC:"Execute Local Command",EXEREM:"Execute Remote Command",PROLOC:"Process Local Command Response",PROREM:"Process Remote Command Response",RNDRPT:"Render Panetable",RNDRRG:"Render Region",RTCONV:"Runtime model presmodel conversion",CLNTLD:"Client Loaded",APPSTR:"Application Startup",APPPNT:"First paint in Authoring",APPINT:"Application Interactive",ALLZNS:"All Zones Loaded",ADJAZN:"Adjusted All Zones Loaded",TBRLAY:"Toolbar Layout",TBRHNT:"Toolbar HandleNewToolbar",TBRADD:"Toolbar AddToolbar",TBRHRE:"Toolbar HandleResize",MDLOAD:"Load js async",EMLOAD:"Emscripten load",RTLOAD:"Runtime load",RTLPRC:"Runtime command local processing",EPLTTI:"Experienced Page Load Time"};function f(e){return null!==e?p[e]:void 0}var m,v;function y(){return null!=window.self.performance&&null!=window.self.performance.mark}!function(e){e[e.None=0]="None",e[e.Navigation=1]="Navigation",e[e.Bootstrap=2]="Bootstrap",e[e.Commands=4]="Commands",e[e.Rendering=16]="Rendering",e[e.Debug=32]="Debug",e[e.Toolbar=64]="Toolbar",e[e.Fonts=128]="Fonts",e[e.HitTest=256]="HitTest",e[e.Maps=512]="Maps",e[e.Exporting=1024]="Exporting",e[e.Min=3]="Min",e[e.Core=15]="Core",e[e.All=65535]="All"}(m||(m={}));class w{constructor(){}logEvent(e){const t=e.parameters,n=w.buildDescriptionName(t.description,t.extraInfo);let r;void 0!==n&&(r=e.metricSuite===m.Bootstrap&&void 0!==t.elapsed&&-1!==t.elapsed?n.includes("Experienced Page Load Time")?w.EPTStartMarker:n.includes("Adjusted All Zones Loaded")?w.ADJAZNStartMarker:w.AppStartMarker:w.logLocalMetricStart(n),w.logLocalMetricEnd(n,r))}static logLocalMetricStart(e){const t=w.buildStartName(e);return w.performanceMarker.mark(t),t}static markAppStart(){w.performanceMarker.mark(w.AppStartMarker)}static markEptStart(){w.markStart(w.EPTStartMarker,0)}static markAdjAznStart(e){w.markStart(w.ADJAZNStartMarker,e)}static markStart(e,t){const n={startTime:t};w.performanceMarker.mark(e,n)}static logLocalMetricEnd(e,t){const n=w.buildEndName(e);null===t&&(t=w.buildStartName(e)),w.performanceMarker.mark(n),w.performanceMarker.measure("✚ "+e,n,t)}static buildDescriptionName(e,t){if(void 0!==e){const n=f(e);return void 0===n?e:void 0!==t?n+t:n}}static buildStartName(e){return"__start__"+e}static buildEndName(e){return"__end__"+e}}w.AppStartMarker="AppStartEpochMarker",w.EPTStartMarker="EPTStartMarker",w.ADJAZNStartMarker="ADJAZNStartMarker",w.performanceMarker=new class{constructor(){this.browserSupportMark=y()}mark(e,t){this.browserSupportMark&&(void 0!==t?window.self.performance.mark(e,t):window.self.performance.mark(e))}measure(e,t,n){if(this.browserSupportMark)try{window.self.performance.measure(e,n,t)}catch(e){}}},function(e){e.null="null",e.navigation="nav",e.contextEnd="wp",e.generic="gen",e.sessionInit="init"}(v||(v={}));class b{}function S(e){switch(e){case"description":return"d";case"time":return"t";case"id":return"id";case"elapsed":return"e";case"values":return"v";case"metricsSessionId":return"sid";case"extraInfo":return"ei";case"workbook":return"wb";case"sheet":return"s";case"isMobile":return"m";case"properties":return"p";case"clientEventId":return"cid";case"vizclientSessionId":return"vsid";case"sessionType":return"st";case"traceId":return"trid";default:return null}}class E{constructor(e=v.null,t,n){this._eventType=e,this._metricSuite=t,this._parameters=n}get eventType(){return this._eventType}get metricSuite(){return this._metricSuite}get parameters(){return this._parameters}}let x=0;const k=[],C=new w,R=y();function T(e,t,n,r=!1,o=!1){const i=new O(P(),e,t,n,r,o);return!r&&k.push(i),i}function I(e){const t=e.id;let n=-1;for(let e=k.length-1;e>=0;e--)if(k[e].id===t){n=e;break}if(-1!==n){const e=k.length-n;for(let t=0;t<e;t++)k.pop()}!function(e){const t=function(e){const t=new b;return t.id=e.id.toString(),t.description=e.description,null!==e.extraInfo&&void 0!==e.extraInfo&&(t.extraInfo=e.extraInfo),null!==e.clientEventId&&void 0!==e.clientEventId&&(t.clientEventId=e.clientEventId),t}(e);t.time=e.endTime(),t.elapsed=e.elapsedMS(),t.isMobile=a(document)||!1;$(new E(v.contextEnd,e.metricSuite,t))}(e)}function $(e){R&&e.eventType!==v.sessionInit&&C.logEvent(e),e.metricSuite!==m.None&&(e.metricSuite&L)===e.metricSuite&&(A.length>0?q(e):U.eventBuffer.push(e))}function P(){const e=x;return++x,e}const _={none:m.None,navigation:m.Navigation,bootstrap:m.Bootstrap,rendering:m.Rendering,commands:m.Commands,toolbar:m.Toolbar,hittest:m.HitTest,debug:m.Debug,fonts:m.Fonts,maps:m.Maps,exporting:m.Exporting,min:m.Min,core:m.Core,all:m.All};let L=m.None;function M(e){if(null!=e&&""!==e){const t=e.split("|");for(const e of t){const t=e.trim().toLowerCase();Object.prototype.hasOwnProperty.call(_,t)&&(L|=_[t])}}}function z(){return L}let N="",A=new Array;function q(e){e.parameters.sessionType=N,A.forEach((t=>{t.logEvent(e)}))}const U=new class{constructor(){this._eventBuffer=[]}get eventBuffer(){return this._eventBuffer}get length(){return this._eventBuffer.length}reset(){this._eventBuffer.length=0}};function B(e){A=e,null!=A&&U.length>0&&(U.eventBuffer.forEach((e=>{q(e)})),U.reset())}class O{constructor(e,t,n,r,o=!1,i=!1){this.localReporter=void 0,this.id=e,this.metricSuite=t,this.description=n,this.getTiming=function(){let e=0;if("undefined"!=typeof window&&window.self&&window.self.performance&&"function"==typeof window.self.performance.now)return e=void 0!==window.self.performance.timing?window.self.performance.timing.responseStart-window.self.performance.timing.navigationStart:0,function(){return window.self.performance.now()-e};{const e=Date.now();return function(){return Date.now()-e}}}(),this.start=i?0:this.getTiming(),this.open=!0,this.clientEventId="",this.end=-1,this.extraInfo=r,this.isBreakdownContext=o,!o&&R&&null!=r&&(this.localReporter=new j(t,n,r))}dispose(){this.close()}close(){this.open&&(this.end=this.getTiming(),!this.isBreakdownContext&&I(this),this.open=!1,void 0!==this.localReporter&&null!==this.localReporter&&this.localReporter.close())}elapsedMS(){return this.open?this.getTiming()-this.start:this.end-this.start}endTime(){return this.end}}class j extends O{constructor(e,t,n){super(P(),e,t);const r=w.buildDescriptionName(t,n);void 0!==r&&(t=r),this.open=!0,this.metricName=t+"#"+(j.eventCount++).toString(),w.logLocalMetricStart(this.metricName)}close(){this.open&&(this.open=!1,w.logLocalMetricEnd(this.metricName,null))}}var D;j.eventCount=0,function(e){e.beforeTTFB="bt",e.afterTTFB="at",e.unfinished="uf",e.incarnation="i",e.timeOrigin="to",e.numberOfWorksheets="ws",e.numberOfTabs="tb",e.embedMode="em",e.navigationType="nt",e.alreadyLoaded="al",e.domLoading="dl",e.loadStaticHtml="lsh",e.responseStart="ep",e.loadViewerBootstrapModule="lvb",e.loadVqlModules="lvql",e.appStartEpoch="aep",e.startSession="ss",e.initBootstrapRequest="ibr",e.handleTsConfig="htc",e.prepareStartSession="pss",e.loadCss="lcss",e.bootstrapOnInitial="boi",e.bootstrapOnErr="boe",e.bootstrapOnSecondary="bos",e.notifiedBootstrap="ntb",e.notifiedBootstrapWithError="nte",e.bootstrapWithoutRoute="bwr",e.bootstrapPostRequestSent="bps",e.bootstrapFitImageOnMouseOver="bfm",e.bootstrapResetOnMouseOver="brm",e.processPrimaryPayload="propri",e.initializeModels="mdlini",e.handleModelEvents="mdlevt",e.processSecondaryPayload="prosec",e.progressiveLoad="pld",e.updateZonesWithVizData="uz",e.processModelUpdate="pmu",e.clientFullyLoaded="clntld",e.imageTilesLoaded="imgld",e.registeredModulesLoaded="rmld",e.moduleLoadAsync="mdload",e.executeRemoteCommand="exerem",e.executeRemoteCommandReturnError="exeerr",e.processRemoteCommandResponse="prorem",e.executeLocalCommand="exeloc",e.processLocalCommandResponse="proloc",e.postLoadOperation="plo",e.getSessionInfo="gsi",e.getSessionInfoReturnError="gse",e.getAccelerationStateForView="gas",e.runtimeLoad="rtload",e.downloadFont="df",e.toolbarLayout="tbrlay",e.toolbarHandleNewToolbar="tbrhnt",e.toolbarAddToolbar="tbradd",e.toolbarHandleResize="tbrhre",e.runtimeModelPresmodelConversion="rtconv",e.applicationStartup="appstr",e.applicationInteractive="appint",e.firstPaintInAuthoring="apppnt"}(D||(D={}));let H=!0;function F(e){H=e}function V(){return H}const W=new Map;function G(e,t){H&&("string"==typeof e?K(m.Bootstrap,e,t):Array.isArray(e)?e.forEach((e=>{K(m.Bootstrap,e,t)})):console.error("Invalid parameter type passed to openEptMetricsContext"))}function J(t){return t+"_"+e.raw()}function Z(e,t){H&&(K(m.Bootstrap,e,t),X(e))}function K(e,t,n){W.set(t,T(e,t,n,!0))}function X(e){if(!H)return;const t=W.get(e);t&&t.dispose()}function Y(e,t){H&&(W.set(e,T(m.Bootstrap,e,t,!0,!0)),X(e))}function Q(){return W}let ee=!1,te=!1;function ne(e){ee?e():document.addEventListener("viewerBootstrapLoaded",(()=>{e()}))}function re(){ee=!0,document.dispatchEvent(new CustomEvent("viewerBootstrapLoaded")),X(D.loadViewerBootstrapModule)}function oe(e){te?e():document.addEventListener("vqlScriptReady",(()=>{e()}))}function ie(){te=!0,document.dispatchEvent(new CustomEvent("vqlScriptReady")),X(D.loadVqlModules)}function se(e,t){return`${ue(t)}/ViewerBootstrap${e?".debug":""}.js`}function ae(e){const t=new Intl.Locale(e.language.replace("_","-")),n=new Intl.Locale(e.locale.replace("_","-"));let r;if(void 0===t.region&&t.language===n.language){const e=ve(n);r=void 0!==e?e:ve(t)||we}else r=ve(t)||we;return{language:r,locale:n}}function le(e,t,n){return new Promise(((r,o)=>{const i=n.createElement("script");i.type="text/javascript",i.src=e,i.async=!1,i.onload=()=>{r()},i.onerror=()=>{o()},t&&(i.crossOrigin="anonymous"),n.head.appendChild(i)}))}function ce(e,t){return new Promise(((n,r)=>{const o=document.createElement("link");o.type="text/css",o.href=e,o.media="all",o.rel="Stylesheet",o.onload=()=>{n()},o.onerror=()=>{r()},t.head.appendChild(o)}))}function ue(e){return he("javascripts",e)}function de(e){const t=Array.from(e.scripts);return t.length&&t.find((e=>e.src.includes("PreBootstrap")))||null}function he(e,t=void 0){const n=de(null!=t?t:document);return n?`${n.src.substring(0,n.src.indexOf("/javascripts"))}/${e}`:e}function ge(){const e=de(document);return e&&"anonymous"===e.crossOrigin||!1}function pe(e){if(g(":pseudo"))return"pseudo";const t=ve(e),n=void 0===t?we:t,r=ve(new Intl.Locale(n.language)),o=Se(n);return void 0!==r&&Se(r)===o?n.language:o}function fe(e,t,n,r,o,i=!1){const s=e?"":"-min",a=e?"":".min",l=t?"mobile":"web",c=pe(r),u=Se(ve(r)||we),d=Se(o),h=ue(document),g=[`${h}/jquery${a}.js`,`${h}/mscorlib${a}.js`,`${h}/jsstrings_${c}.js`,`${h}/messages.${u}.js`,`${h}/formatters-and-parsers.${d}.js`];return n&&g.push(`${h}/codemirror${s}.js`),e?(g.push(`${h}/vqlbrowsersupport.debug.js`,`${h}/vqlfiledropresponder.debug.js`,`${h}/vqlcore.debug.js`,`${h}/vqldomain.debug.js`,`${h}/vqlauthoringdomain.debug.js`,`${h}/iscroll.js`,`${h}/shared-widgets.js`,`${h}/eventutils.js`,`${h}/spiffui.debug.js`,`${h}/spiffui${l}.debug.js`,`${h}/tabruntime.debug.js`,`${h}/vqlmoduleinterfaces.debug.js`,`${h}/vqllegacydojomoduleinterfaces.debug.js`,`${h}/vqlui.debug.js`,`${h}/vqlruntimerendered.debug.js`,`${h}/vqlvizzone.debug.js`,`${h}/vqlvizzonedesktop.debug.js`,`${h}/vqllegendzone.debug.js`,`${h}/require.js`,`${h}/vqlruntimeui.debug.js`,`${h}/vqlui${l}.debug.js`,`${h}/vqlvizzone${l}.debug.js`,`${h}/vqllegendzone${l}.debug.js`,`${h}/vqlversion.js`),n&&g.push(`${h}/vqlauthoring.debug.js`,`${h}/vqlresizeheadersmodule.debug.js`,`${h}/vqlauthoring${l}.debug.js`)):(g.push(`${h}/vql${l}.js`),n&&g.push(`${h}/vqlauthoring${l}.js`)),i&&g.push("/sidecar/scripts.js"),g}const me=["de-DE","en-US","en-GB","es-ES","fr-FR","fr-CA","it-IT","ja-JP","ko-KR","pt-BR","sv-SE","th-TH","zh-CN","zh-TW"].map((e=>new Intl.Locale(e))).reduce(((e,t)=>(e[Se(t)]=t,void 0===e[t.language]&&(e[t.language]=t),e)),{});function ve(e){return e=function(e){switch(Se(e,"-")){case"zh-HK":case"zh-MO":return new Intl.Locale("zh-TW");case"zh-SG":return new Intl.Locale("zh-CN");default:return e}}(e),me[Se(e)]}function ye(e){const t=ve(e);return void 0===t?me[e.language]:t}const we=new Intl.Locale("en-US");function be(){return navigator.languages.map((e=>new Intl.Locale(e)))}function Se(e,t="_"){return void 0===e.region?e.language:`${e.language}${t}${e.region}`}function Ee(e){return e.map(ye).find((e=>void 0!==e))||we}function xe(e){ne((()=>{const t=window.tabBootstrap.ViewerBootstrap.get_instance();G([D.bootstrapOnInitial,D.bootstrapOnErr]),t.bootstrap(e),t.showLyteboxIfNeeded()}))}function ke(e,t,n){n()}function Ce(e,t,n){n()}class Re{constructor(e,t){this.vizqlSessionRoute=e,this.ingressProxySessionHeader=t}static FromHeaders(e,t){return new Re(e.get("X-Session-Id")||"",e.get("Global-Session-Header")||(null==t?void 0:t.ingressProxySessionHeader)||"")}}var Te=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};function Ie(e){const t=function(e){const t=e.hash;return t.length<2?null:t.substring(1).split("&").find((e=>{const t=parseInt(e,10);return e.indexOf("=")<0&&t?t:null}))||null}(e)||"0";return`tab.viz.${e.pathname}#${t}`}function $e(e){return`tab.viz.session.${e}`}function Pe(e){return`tab.viz.session.routes.${e}`}const _e="tab.viz.session.management.roots";function Le(e,t){return""===e&&"object"==typeof t?new Map(Object.entries(t)):t}class Me{constructor(e){this.storage=e}get length(){var e;return(null===(e=this.storage)||void 0===e?void 0:e.length)||0}storeItem(e,t){if(null!==this.storage)try{this.storage.setItem(e,t)}catch(e){console.error(e)}}guardAgainstStorageUpdates(e,t){return new Promise(((n,r)=>{const o=t=>{this.storage===t.storageArea&&e===t.key&&r(t.newValue)};try{window.addEventListener("storage",o),n(t(e))}finally{window.removeEventListener("storage",o)}}))}getSessionHistory(e){if(null===this.storage)return null;const t=this.storage.getItem($e(e));return t?JSON.parse(t):null}isExpired(e){const t=this.getSessionHistory(e);return!!t&&Date.now()-6e4*(t.sessionIdleMinutes||60)>6e4*t.lastActiveMinutesSinceEpoch}storeSessionRoute(e,t){return Te(this,void 0,void 0,(function*(){if(null===this.storage)return;const n=Ie(e),r=JSON.stringify(t);if(this.storage.getItem(n)===r)return;this.storeItem(n,r);const o=Pe(t.vizqlSessionRoute),i=new Set(JSON.parse(this.storage.getItem(o)||"[]"));i.add(n),this.storeItem(o,JSON.stringify(Array.of(...i)));let s=!1,a=0;for(;!s&&a<10;)yield this.guardAgainstStorageUpdates(_e,(e=>{if(null===this.storage)return null;const n=this.storage.getItem(e),r=JSON.parse(n||"{}",Le);return r.set(t.vizqlSessionRoute,Date.now()),JSON.stringify(Object.fromEntries(r))})).then((e=>{null!==e&&(this.storeItem(_e,e),s=!0)})).catch((()=>{a+=1}))}))}getSessionRoute(e){if(null===this.storage)return null;const t=this.storage.getItem(Ie(e));if(t){const e=JSON.parse(t);return this.isExpired(e.vizqlSessionRoute)?null:e}return null}updateSession(e,t,n){const r=$e(e);this.storeItem(r,JSON.stringify(Object.assign({lastActiveMinutesSinceEpoch:Math.floor(t/6e4)},n)))}getSessionJson(e){if(null===this.storage)return null;const t=this.getSessionRoute(e);if(t){const e=$e(t.vizqlSessionRoute);return this.storage.getItem(e)}return null}purge(e){return Te(this,void 0,void 0,(function*(){null!==this.storage&&(yield this.guardAgainstStorageUpdates(_e,(t=>{if(null===this.storage)return null;const n=this.storage,r=new Map,o=n.getItem(t),i=JSON.parse(o||"{}",Le);return i&&i.forEach(((t,o,i)=>{if(t>e)r.set(o,t);else{n.removeItem($e(o));const e=Pe(o),t=JSON.parse(n.getItem(e)||"[]");t&&(n.removeItem(e),t.forEach((e=>{n.removeItem(e)})))}})),JSON.stringify(Object.fromEntries(r))})).then((e=>{null!==e&&this.storeItem(_e,e)})).catch((()=>console.log("Deferring session management deletions"))))}))}removeLocation(e){if(null===this.storage)return;const t=Ie(e);this.storage.removeItem(t)}}function ze(e,t){var n;const r=null===(n=null===window||void 0===window?void 0:window.tab)||void 0===n?void 0:n.Strings;return r?Promise.resolve(r):function(e,t){return le(`${ue(e)}/jsstrings_${pe(t)}.js`,ge(),e)}(e,t).then((()=>window.tab.Strings))}class Ne{constructor(e){var t,n;this.hiddenSheet="(?<hiddenSheet>[^/]+)",this.workbook="(?<workbook>[^/]+)",this.view="(?<view>[^/]+)",this.vizqlRoot=null!==(t=null==e?void 0:e.vizqlRoot)&&void 0!==t?t:h(document),this.vizqlSessionId=null!==(n=null==e?void 0:e.sessionId)&&void 0!==n?n:null}stickySession(){return this.vizqlSessionId?`/sessions/${this.vizqlSessionId}`:""}getVizqlRoot(){return this.vizqlRoot}}class Ae extends Ne{constructor(e){super(e),this.optionalSite="(?<siteComponents>/t/(?<siteName>[^/]+))?",this.genericScenario="(?<scenario>showInstantAnalytics|authoringNewWorkbook|editDatasource|createPublishedDatasource|newWorkbook|shared|workbooks|show_metrics_view)",this.scenarioRewrites=new Map([["authoringNewWorkbook","newWorkbookFromDatasource"],["showInstantAnalytics","instantAnalytics"],["show_metrics_view","showMetricsView"]])}rewriteScenario(e){return this.scenarioRewrites.get(e)||e}adminView(){return new RegExp(`^${this.vizqlRoot}/showadminview/${this.workbook}/${this.view}$`)}views(){return new RegExp(`^${this.optionalSite}/views/${this.workbook}/${this.view}(?<customizedView>/.+/.+)?$`)}authoring(){return new RegExp(`^${this.optionalSite}/authoring/${this.workbook}/${this.view}(?:/${this.hiddenSheet})?$`)}authoringExtractDraft(){return new RegExp(`^${this.optionalSite}/authoringExtractDraft/${this.workbook}/${this.view}/(?<tail>.+)`)}generic(){return new RegExp(`^(?:${this.vizqlRoot})?${this.optionalSite}/${this.genericScenario}(?<tail>/.*)`)}getStartSessionUrl(e){var t,n;const r=/^\/show(?<authoring>\.authoring)?(?<mobile>\.mobile)?(?<debug>\.debug)?\.html\/(?<repoUrl>.+)$/.exec(e.pathname);r&&r.groups&&(e.pathname=(r.groups.authoring?"/authoring":"/views")+(r.groups.repoUrl?`/${r.groups.repoUrl}`:""),(null===(t=r.groups)||void 0===t?void 0:t.mobile)&&e.searchParams.append(":mobile","true"),(null===(n=r.groups)||void 0===n?void 0:n.authoring)&&(e.searchParams.append(":embed","y"),e.searchParams.append(":isVizPortal","true")));const o=this.views().exec(e.pathname);if(o&&o.groups){const t=new URL(e);return t.pathname=this.vizqlRoot+(o.groups.siteComponents||"")+`/w/${o.groups.workbook}`+`/v/${o.groups.view}/startSession`+this.stickySession()+(o.groups.customizedView?"/customizedView"+o.groups.customizedView:"/viewing"),t}const i=this.authoring().exec(e.pathname);if(i&&i.groups){const t=new URL(e),n=i.groups.hiddenSheet;return t.pathname=this.vizqlRoot+(i.groups.siteComponents||"")+`/w/${i.groups.workbook}`+`/v/${i.groups.view}/startSession`+this.stickySession()+"/authoring"+(n?`/${n}`:""),t}const s=this.authoringExtractDraft().exec(e.pathname);if(s&&s.groups){const t=new URL(e);return t.pathname=this.vizqlRoot+(s.groups.siteComponents||"")+`/w/${s.groups.workbook}`+`/v/${s.groups.view}/startSession`+this.stickySession()+"/authoringExtractDraft/"+s.groups.tail,t}const a=this.generic().exec(e.pathname);if(a&&a.groups){const t=new URL(e),n=this.rewriteScenario(a.groups.scenario);return t.pathname=this.vizqlRoot+(a.groups.siteComponents||"")+"/startSession"+this.stickySession()+"/"+n+(a.groups.tail||""),t}const l=this.adminView().exec(e.pathname);if(l&&l.groups){const t=new URL(e);return t.pathname=this.vizqlRoot+(l.groups.siteComponents||"")+`/w/${l.groups.workbook}`+`/v/${l.groups.view}/startSession`+this.stickySession()+"/showAdminView",t}if(/templates\/show\.([^/]*)testing\.html$/.exec(e.pathname))return new URL("/data/tsconfig.json",e.origin);throw new Error(`Unrecognized vizql URL ${e.href}`)}}class qe extends Ne{constructor(e){var t;super(e);const n=null!==(t=null==e?void 0:e.showPagePrefix)&&void 0!==t?t:d(document);this.showPageOptionalPrefix=n?`(?:${n})?`:""}views(){return new RegExp(`^${this.showPageOptionalPrefix}/views/${this.workbook}/${this.view}(?<customizedView>/.+/.+)?$`)}authoring(){return new RegExp(`^${this.showPageOptionalPrefix}/authoring/${this.workbook}/${this.view}(?:/${this.hiddenSheet})?$`)}newWorkbook(){return new RegExp(`^${this.showPageOptionalPrefix}/(?<scenario>newWorkbook)(?<tail>/.*)`)}getVizqlUrl(e){const t=new URL(this.vizqlRoot,e.origin);return t.search=e.search,t.hash=e.hash,t}getStartSessionUrl(e){const t=this.getVizqlUrl(e),n=this.views().exec(e.pathname);if(n&&n.groups)return t.pathname+=`/w/${n.groups.workbook}/v/${n.groups.view}/startSession`+this.stickySession()+(n.groups.customizedView?"/customizedView"+n.groups.customizedView:"/viewing"),t;const r=this.authoring().exec(e.pathname);if(r&&r.groups){const e=r.groups.hiddenSheet;return t.pathname+=`/w/${r.groups.workbook}/v/${r.groups.view}/startSession`+this.stickySession()+"/authoring"+(e?`/${e}`:""),t}const o=this.newWorkbook().exec(e.pathname);if(o&&o.groups){const e=o.groups.scenario;return t.pathname+="/startSession"+this.stickySession()+"/"+e+(o.groups.tail||""),t}throw new Error(`Unrecognized vizql URL ${e.href}`)}}class Ue{constructor(e){var t;const n=null!==(t=null==e?void 0:e.isSalesforceNative)&&void 0!==t?t:u(document);this.pathUtils=n?new qe(e):new Ae(e)}getStartSessionUrl(e){return this.pathUtils.getStartSessionUrl(e)}getVizPathHeaderValue(e){const t=this.getStartSessionUrl(e),n=this.pathUtils.getVizqlRoot();if(!n)throw new Error("vizqlRoot was unexpectedly null. Failed to extract viz path header value.");let r=t.toString().match(n+"(.*?)/v/.*?/startSession/");return r&&r[1]?r[1]:(r=t.toString().match(n+"(.*?)/startSession/"),r&&r[1]?r[1]:(console.warn(`Failed to find viz path regular expression match given vizqlRoot: ${n} and startSessionUrl: ${t.href}`),null))}}class Be{constructor(e){this.doc=e}overwriteTitle(e){const t=this.doc.getElementById("tabBootErrTitle");return t&&(t.textContent=e),this}overwriteBody(e){const t=this.doc.getElementById("tabBootErrBody");return t&&(t.textContent=e),this}overwriteBodyHTML(e){const t=this.doc.getElementById("tabBootErrBody");return t&&(t.innerHTML=e),this}hideLoadIndicators(){const e=window.parent;e&&e.postMessage&&e.postMessage("tableau.completed","*")}show(){this.hideLoadIndicators(),setTimeout((()=>{const e=this.doc.getElementById("tabBootErr");e&&(e.style.display="block")}),0)}}function Oe(e,t,n,r,o){const i=new je(e,t);e.body.replaceChildren(i.getBodyContents(n,r,o)),e.querySelectorAll('style,link[rel="stylesheet"]').forEach((e=>e.remove()))}class je{constructor(e,t){this.doc=e,this.strings=t}htmlEncode(e){const t=this.doc.createElement("div");t.innerText=e;const n=t.innerHTML;return t.remove(),n}getBodyContents(e,t,n){const r=c(this.doc);if(r||0===e.length||0===e[0].length){const e=this.doc.createElement("blockquote");e.style.backgroundColor="#eee",e.style.padding="10pt";const n=this.doc.createElement("p");if(n.innerHTML=this.strings.getString("ErrorPageUnexpectedError"),e.appendChild(n),r){const n=this.doc.createElement("br");e.appendChild(n),e.insertAdjacentHTML("beforeend",`${this.strings.ErrorPageHelpOnline(t)}</a>.`)}return e}{const t=this.doc.createElement("div");t.style.padding="15px";const r=this.doc.createTextNode(this.strings.getString("ErrorPageErrorDetails"));t.appendChild(r);const o=this.doc.createElement("blockquote");if(o.style.backgroundColor="#eee",o.style.padding="10pt",e.length&&e[0].length){const t=this.doc.createElement("span");t.className="TextInsideTable",n&&n.length&&(t.innerHTML=this.htmlEncode(n));const r=this.doc.createElement("ul");e.forEach((e=>{if(e.length){const t=this.doc.createElement("li");t.innerHTML=this.htmlEncode(e),r.appendChild(t)}})),t.appendChild(r),o.appendChild(t)}return t.appendChild(o),t.appendChild(this.doc.createTextNode(this.strings.getString("ErrorPageClickRefresh"))),t.appendChild(this.doc.createElement("br")),t.appendChild(this.doc.createTextNode(this.strings.getString("ErrorPageContactTableauServer"))),t}}}var De=n(55);function He(e){var t={},n="";for(var r in e){var o=e[r];if("$unique"===r)t[De.IS_UNIQUE]=o;else if("$nest"===r){var i=o;for(var s in i){var a=i[s];t[s]=He(a).result}}else"$debugName"===r?n=o:t[r]=o}return{result:t,debugName:n}}var Fe="undefined"==typeof requestAnimationFrame?function(e){return setTimeout(e)}:"undefined"==typeof window?requestAnimationFrame:requestAnimationFrame.bind(window);function Ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n={},r=0,o=e;r<o.length;r++){var i=o[r];if(null!=i&&!1!==i)for(var s in i){var a=i[s];(a||0===a)&&("$nest"===s&&a?n[s]=n.$nest?Ve(n.$nest,a):a:-1!==s.indexOf("&")||0===s.indexOf("@media")?n[s]=n[s]?Ve(n[s],a):a:n[s]=a)}}return n}var We=function(){return De.create(void 0,!0)},Ge=new(function(){function e(e){var t=e.autoGenerateTag,n=this;this.cssRaw=function(e){e&&(n._raw+=e||"",n._pendingRawChange=!0,n._styleUpdated())},this.cssRule=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var o=He(Ve.apply(void 0,t)).result;n._freeStyle.registerRule(e,o),n._styleUpdated()},this.forceRenderStyles=function(){var e=n._getTag();e&&(e.textContent=n.getStyles())},this.fontFace=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=n._freeStyle,o=0,i=e;o<i.length;o++){var s=i[o];r.registerRule("@font-face",s)}n._styleUpdated()},this.getStyles=function(){return(n._raw||"")+n._freeStyle.getStyles()},this.keyframes=function(e){var t=function(e){var t={$debugName:void 0,keyframes:{}};for(var n in e){var r=e[n];"$debugName"===n?t.$debugName=r:t.keyframes[n]=r}return t}(e),r=t.keyframes,o=t.$debugName,i=n._freeStyle.registerKeyframes(r,o);return n._styleUpdated(),i},this.reinit=function(){var e=We();n._freeStyle=e,n._lastFreeStyleChangeId=e.changeId,n._raw="",n._pendingRawChange=!1;var t=n._getTag();t&&(t.textContent="")},this.setStylesTarget=function(e){n._tag&&(n._tag.textContent=""),n._tag=e,n.forceRenderStyles()},this.stylesheet=function(e){for(var t={},r=0,o=Object.getOwnPropertyNames(e);r<o.length;r++){var i=o[r],s=e[i];s&&(s.$debugName=i,t[i]=n.style(s))}return t};var r=We();this._autoGenerateTag=t,this._freeStyle=r,this._lastFreeStyleChangeId=r.changeId,this._pending=0,this._pendingRawChange=!1,this._raw="",this._tag=void 0,this.style=this.style.bind(this)}return e.prototype._afterAllSync=function(e){var t=this;this._pending++;var n=this._pending;Fe((function(){n===t._pending&&e()}))},e.prototype._getTag=function(){if(this._tag)return this._tag;if(this._autoGenerateTag){var e="undefined"==typeof window?{textContent:""}:document.createElement("style");return"undefined"!=typeof document&&document.head.appendChild(e),this._tag=e,e}},e.prototype._styleUpdated=function(){var e=this,t=this._freeStyle.changeId,n=this._lastFreeStyleChangeId;(this._pendingRawChange||t!==n)&&(this._lastFreeStyleChangeId=t,this._pendingRawChange=!1,this._afterAllSync((function(){return e.forceRenderStyles()})))},e.prototype.style=function(){var e=this._freeStyle,t=He(Ve.apply(void 0,arguments)),n=t.result,r=t.debugName,o=r?e.registerStyle(n,r):e.registerStyle(n);return this._styleUpdated(),o},e}())({autoGenerateTag:!0}),Je=Ge.setStylesTarget,Ze=(Ge.cssRaw,Ge.cssRule),Ke=(Ge.forceRenderStyles,Ge.fontFace,Ge.getStyles,Ge.keyframes,Ge.reinit,Ge.style);Ge.stylesheet;const Xe="typeStyleContainer";var Ye;!function(e){e[e.GENERIC=0]="GENERIC",e[e.FORBIDDEN=1]="FORBIDDEN"}(Ye||(Ye={}));const Qe=e=>{switch(e){case 403:return Ye.FORBIDDEN;case 404:return Ye.GENERIC;default:return null}};function et(e){Array.from(e.querySelectorAll('style,link[rel="stylesheet"]')).filter((e=>e.id!==Xe)).forEach((e=>e.remove()))}const tt=e=>e===Ye.FORBIDDEN?"InstantAnalyticsUserRoleExceptionMessage":"InstantAnalyticsGenericExceptionMessage";class nt{constructor(e,t){this.doc=e,this.strings=t}createContentContainer(e){const t=this.doc.createElement("div");return t.className=Ke({display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",position:"fixed",height:"100%",width:"100%"}),t.appendChild(this.workbookIcon()),t.appendChild(this.heading()),t.appendChild(this.subheading(e)),t}heading(){const e=this.doc.createElement("p");return e.className=Ke({color:"#333333",fontSize:"18px",fontFamily:"Benton Sans, sans-serif",marginBottom:"14px"}),e.textContent=this.strings.getString("InstantAnalyticsErrorPageHeading"),e}subheading(e){const t=this.doc.createElement("p");return t.className=Ke({fontSize:"14px",fontFamily:"Benton Sans, sans-serif"}),t.textContent=e,t}workbookIcon(){const e=this.doc.createElement("div");return e.className=Ke({backgroundImage:`url(${he("images/workbook-spot-icon.svg")})`,height:"60px",width:"60px",marginBottom:"16px"}),e}}class rt{constructor(e,t,n){this.doc=e,this.strings=t,this.serverName=n}getBodyContents(){const e=this.doc.createElement("h1");return e.innerHTML=this.strings.MaintenanceMessage(this.serverName),e}}class ot{constructor(e,t,n,r){this.doc=e,this.strings=t,this.linksGallery=n,this.requestString=r}topPageElements(){return[this.heading(),this.errorParagraph(),this.requestIdParagraph()]}heading(){const e=this.doc.createElement("h1");return e.innerHTML=this.strings.getString("PageNotFoundResourceNotFound"),e}errorParagraph(){const e=this.doc.createElement("p");return e.innerHTML=this.strings.getString("PageNotFoundPleaseCheckUrlAndTryAgain"),e}requestIdParagraph(){const e=this.doc.createElement("p");return e.id="requestID",e}}class it{constructor(e,t){this.doc=e,this.strings=t}getBodyContents(){const e=this.doc.createElement("b");e.innerHTML=this.strings.getString("MobileAuthoringUnsupportedError");const t=this.doc.createElement("div");t.style.margin="0px 8px",t.innerHTML=this.strings.getString("MobileAuthoringUnsupportedFeatureUnavailable");const n=this.doc.createElement("div");return n.className="mobileAuthoringUnsupportedError",n.style.fontFamily="Arial, Helvetica, sans-serif",n.style.backgroundColor="#f8c7cb",n.style.boxShadow="1px 1px rgba(0, 0, 0, 0.15)",n.style.display="flex",n.style.padding="12px 24px",n.style.margin="24px",n.appendChild(e),n.appendChild(t),n}}class st{constructor(e,t){this.doc=e,this.strings=t,this.publicGalleryUrl=function(e){var t;return(null===(t=i(e))||void 0===t?void 0:t.publicGalleryLink)||null}(this.doc)||"https://public.tableau.com/s/gallery"}topPageElements(){return[this.whereViz(),this.br(),this.explanation(),this.br(),this.br(),this.browseGallery(),this.inspiration()]}br(){return this.doc.createElement("br")}textInsideTable(){const e=this.doc.createElement("p");return e.className="Textinsidetable",e}whereViz(){const e=this.textInsideTable();return e.style.fontSize="18px",e.textContent=this.strings.getString("ShowPageErrorPublicWhereViz"),e}explanation(){const e=this.textInsideTable();return e.innerHTML=this.strings.getString("ShowPageErrorPublicContentNotFound"),e}browseGallery(){const e=this.textInsideTable();return e.innerHTML=this.strings.PublicErrorBrowseGallery(this.publicGalleryUrl),e}inspiration(){const e=this.doc.createElement("div");return e.id="inspiration",e.style.textAlign="left",e.appendChild(this.table()),e}table(){const e=this.doc.createElement("table");e.cellPadding="0",e.cellSpacing="0",e.border="0",e.width="100%";const t=e.insertRow();t.insertCell().appendChild(this.clearImageWithWidth(24));const n=t.insertCell();return n.style.position="relative",n.width="100%",n.appendChild(this.galleryImageContainer()),t.insertCell().appendChild(this.clearImageWithWidth(4)),e}clearImageWithWidth(e){const t=this.doc.createElement("img");return t.src=he("/images/clear.gif"),t.alt="Clear",t.width=e,t.height=1,t}galleryImageContainer(){const e=this.doc.createElement("div");e.style.position="relative";const t=this.doc.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";const n=this.doc.createElement("div");n.style.paddingRight="20px";const r=this.doc.createElement("p");r.className="imgTitle";const o=this.doc.createElement("a");return o.className="img",o.href=this.publicGalleryUrl,o.appendChild(this.galleryImage()),o.appendChild(this.br()),r.appendChild(o),n.appendChild(r),t.appendChild(n),e.appendChild(t),e}galleryImage(){const e=this.doc.createElement("img");return e.src=he("/images/404_gallery.png"),e.id="galleryImage",e.className="autoSizeImage",e.alt="Sample Gallery",e.style.maxHeight="100px",e.style.maxWidth="545px",e}}var at=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const lt=":redirect",ct="auth",ut=":skipSmartRouting";function dt(){const e=new URL(window.location.href);e.searchParams.get(lt)&&(e.searchParams.delete(lt),window.history.replaceState(window.history.state,"",e.href))}function ht(e){window.top&&window.top!==window?setTimeout((()=>{e()}),0):e()}function gt(e){return at(this,void 0,void 0,(function*(){const t=e.headers.get("content-type");return t&&t.includes("application/json")?yield e.json():null}))}function pt(e,t,n){return at(this,void 0,void 0,(function*(){let r;try{r=yield n}catch(e){return void console.log("Unable to load localized strings")}if(c(t))yield function(e){const t=he("stylesheets"),n=[`${t}/base_packaged.css`,`${t}/404.css`];return Promise.all(n.map((t=>ce(t,e))))}(t),function(e,t){const n=new st(e,t);e.body.replaceChildren(...n.topPageElements())}(t,r);else{const n=yield gt(e);if(n&&"missing-view"===n.type)return void function(e,t,n,r){const o=new ot(e,t,n,r);e.body.replaceChildren(...o.topPageElements()),e.body.className="body",e.querySelectorAll('style,link[rel="stylesheet"]').forEach((e=>e.remove())),function(e){le(`${ue(document)}/vizqlserver/404.js`,ge(),e)}(e)}(t,r,n.linksGallery,n.requestString);new Be(t).overwriteTitle(r.getString("ShowPageErrorNotFoundSummary")).overwriteBody(r.getString("ShowPageErrorNotFoundDetail")).show()}}))}function ft(e,t,n){return n||(n=ht),r=>at(this,void 0,void 0,(function*(){var o;window.top&&window.top!==window&&function(e,t){try{const n={redirected:e.redirected,status:e.status};t.postMessage({name:"vizloaderror",response:n},new URL(document.referrer).origin)}catch(e){console.error(e)}}(r,window.parent);const i=null!==(o=r.headers.get("Tableau-User-Language"))&&void 0!==o?o:r.headers.get("Content-Language"),s=be();null!==i&&s.unshift(new Intl.Locale(i));const a=Ee(s),l=ze(e,a),c=e.location||new URL(e.baseURI);if(c.pathname.startsWith("/vizql/showInstantAnalytics")&&function(e,t,n){const r=Qe(e);return null!=r&&(t.then((e=>{!function(e,t,n){const r=new nt(e,t),o=tt(n),i=t.getString(o);et(e),e.body.replaceChildren(r.createContentContainer(i))}(n,e,r)})).catch((()=>console.error("Unable to display Instant Analytics error page."))),!0)}(r.status,l,e))return;if(r.redirected&&r.url===c.origin+"/")return void n((()=>{const n=c.href.substring(r.url.length);t(`${c.origin}/#/${n}`,e)}));const u=r.headers.get("Location"),d=new URL(c.href);switch(r.status){case 200:break;case 400:return void function(e,t,n){at(this,void 0,void 0,(function*(){const r=yield gt(e);let o;try{o=yield n}catch(e){return void console.log("Unable to load localized strings")}if(r)switch(r.type){case"mobile-authoring-unsupported":return void function(e,t){const n=new it(e,t);e.body.replaceChildren(n.getBodyContents()),e.querySelectorAll('style,link[rel="stylesheet"]').forEach((e=>e.remove()))}(t,o);case"instant-analytics-error":return void function(e,t,n,r){const o=new nt(e,t);r&&(e.title=r),et(e),e.body.replaceChildren(o.createContentContainer(n))}(t,o,r.localizedErrorMessage||"",r.pageTitle)}new Be(t).overwriteTitle(o.getString("ServerErrorRejected")).overwriteBodyHTML(o.getString("ServerErrorRejectedMessage")).show()}))}(r,e,l);case 401:if(u)return void n((()=>{var n;d.searchParams.get(lt)===ct&&new URL(null!==(n=new URL(u).searchParams.get("path"))&&void 0!==n?n:"/",document.location.href).searchParams.get(lt)===ct?l.then((t=>{new Be(e).overwriteTitle(t.getString("ServerErrorUnexpected")).overwriteBody(t.getString("ServerErrorUnknown")).show()})).catch((()=>console.log("Unable to load localized strings"))):t(u,e)}));break;case 403:return void function(e,t,n){at(this,void 0,void 0,(function*(){const r=yield gt(e);if(r&&"trusted-ticked-failed"===r.type){const e=r.details||[],o=r.communityLink||"";let i;try{i=yield n}catch(e){return void console.log("Unable to load localized strings")}Oe(t,i,e,o,r.errorType)}else pt(e,t,n)}))}(r,e,l);case 404:return void pt(r,e,l);case 413:return void l.then((t=>{new Be(e).overwriteTitle(t.getString("ShowPageErrorResourceLimitExceededSummary")).overwriteBodyHTML(t.getString("ShowPageErrorResourceLimitExceededDetail")+"<br>"+t.getString("PressBackButtonMessage")).show()})).catch((()=>console.log("Unable to load localized strings")));case 429:return void l.then((t=>{new Be(e).overwriteTitle(t.getString("RequestCountExceededTitle")).overwriteBody(t.getString("RequestCountExceededWarning")).show()})).catch((()=>console.log("Unable to load localized strings")));case 502:case 503:return void function(e,t,n,r,o,i,s){at(this,void 0,void 0,(function*(){const a=":refresh";if("no"===n.searchParams.get(a))return void mt(e,o,t);const l=yield gt(e);if(l){let e;try{e=yield o}catch(e){return void console.log("Unable to load localized strings")}const n=l.serverName||"",r=l.details||[],i=l.communityLink||"";switch(l.type){case"maintenance":return void function(e,t,n){const r=new rt(e,t,n);e.body.replaceChildren(r.getBodyContents()),e.querySelectorAll('style,link[rel="stylesheet"]').forEach((e=>e.remove()))}(t,e,n);case"no-license":return void Oe(t,e,r,i,l.errorType)}}s((()=>{new Me(window.localStorage).removeLocation(r),n.searchParams.set(a,"no"),i(n.href,t)}))}))}(r,e,d,c,l,t,n);default:console.error(`Unhandled response: ${r.status}`)}yield mt(r,l,e)}))}function mt(e,t,n){return at(this,void 0,void 0,(function*(){const r=yield gt(e);let o;try{o=yield t}catch(e){return console.log("Unable to load localized strings"),void new Be(n).show()}if(r){const e=r.details||[],t=r.communityLink||"";if("exception"===r.type)return void Oe(n,o,e,t,r.errorType)}new Be(n).overwriteTitle(o.getString("ServerErrorUnexpected")).overwriteBody(o.getString("ServerErrorUnknown")).show()}))}const vt={maxWidth:0,maxHeight:0,minWidth:0,minHeight:0};function yt(e,t,n){if(t)return vt;if(e.showTabs||e.showLytebox)return e.composite_sizes[n];{const t=e.current_sheet_name?e.current_sheet_name:decodeURIComponent(e.sheetId),r=e.view_sizes[t];if(r)return r[n]}return vt}function wt(e){const t=g(":display_spinner",!0),n=g(":display_overlay",!0);if(t){const t=e.getElementById("loadingSpinner");t&&t.style.removeProperty("display")}if(n){const t=e.getElementById("loadingGlassPane");t&&t.style.removeProperty("display")}}var bt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};const St=new Me(function(){try{return window.localStorage}catch(e){return null}}());function Et(n,r){return bt(this,void 0,void 0,(function*(){return wt(document),function(e,t){const n=ge(),r=s(e)||!1,o=a(e)||!1,i=be().map(ve).find((e=>void 0!==e))||we,l=fe(t,o,r,i,i);l.unshift(se(t,e)),l.map((t=>function(e,t,n){const r=document.createElement("link");r.rel="preload",r.href=e,r.as="script",t&&(r.crossOrigin="anonymous"),n.head.appendChild(r)}(t,n,e)))}(document,l(document)||!1),function(t,n,r){G(D.prepareStartSession);const o={Accept:"application/json"},i=new URL(r.location.href);i.searchParams.set(lt,ct),o["Tableau-Viz-Location"]=i.href,o.TraceID=e.raw(),n&&(o.Authorization=`Bearer ${n}`);const s=function(e,t){var n;const r=null!==(n=t&&u(t))&&void 0!==n&&n,o=h(t),i=r?o:"/"+(o||"vizql"),s={isSalesforceNative:r,sessionId:e,showPagePrefix:d(t)||void 0,vizqlRoot:i};return new Ue(s)}((null==t?void 0:t.vizqlSessionRoute)||null,r);if(!g(ut)){const e=s.getVizPathHeaderValue(i);e?o["Tableau-Viz-Path"]=e:console.warn("Unable to retrieve a valid viz path header value. Omitting Tableau-Viz-Path header.")}return X(D.prepareStartSession),G(D.startSession),fetch(s.getStartSessionUrl(i),{headers:o,method:"POST"})}(n||null,r||null,document).then(xt).then((e=>(dt(),function(e){const t="Global-Session-Header";return e.json().then((n=>(n.vizqlRoutingHeaderName=t,n.vizqlRoutingKey=e.headers.get(t)||"",n)))}(e).then((e=>function(e,n){G(D.handleTsConfig),t((()=>{Ct(false,n),X(D.handleTsConfig)}))}(0,e))).catch((e=>{Tt(e)})),e)),(e=>(ft(document,((e,t)=>t.location.replace(e)))(e),dt(),null)))}))}function xt(e){return X(D.startSession),e.ok&&e.body&&!e.redirected?Promise.resolve(e):Promise.reject(e)}function kt(){const e=document.getElementById("tsConfigContainer");return JSON.parse(e.innerText)}function Ct(e,t){t&&(function(e){document.getElementById("tsConfigContainer").value=JSON.stringify(e),document.dispatchEvent(new CustomEvent("tsConfigLoaded"))}(t),Rt(e,t))}function Rt(e,t){t&&(e||function(e,t,n){const r=ge(),o=t.is_authoring,s=t.is_mobile,{language:a,locale:l}=ae(t),c=!u(e)&&!function(e){var t;return e&&(null===(t=i(e))||void 0===t?void 0:t.isOffline)||null}(e),d=fe(n,s,o,a,l,c),h=se(n,e);G(D.loadViewerBootstrapModule),le(h,r,e).then((()=>{re()})).catch((e=>console.error(`Bootstrap failed with unhandled error: ${e.toString()}`))),G(D.loadCss);const g=function(e,t,n){const r=[],o=e?"":"-min",i=t?"mobile":"web",s=e?".debug":"",a=he("css",window.document);return a&&n&&(r.push(`${a}/codemirror${o}.css`),r.push(`${a}/vqldatatab${i}${s}.css`),r.push(`${a}/vqlcategoricalbindialog${i}${s}.css`)),r}(n,s,o);g.forEach((t=>{ce(t,e).catch((e=>console.error(`Error loading resource ${t}: ${e.toString()}`)))})),X(D.loadCss),G([D.loadVqlModules]),ne((()=>{const t=d.map((t=>le(t,r,e)));Promise.all(t).then((()=>{ie()})).catch((e=>console.error(`Vql script load error: ${e.toString()}`)))}))}(document,t,l(document)||!1),function(e,t){!function(e,t){if(!t.bootstrapOnMouseover)return;const n=e.getElementById("staticImage");if(null!==n){const e=t.showTabs?31:9,r=t.staticImage.replace(/_rss/g,"");n.style.backgroundColor="transparent",n.style.background=`no-repeat url(${r})`,n.style.left="4px",n.style.top=`${e}px`,n.style.width="auto",n.style.height="auto",n.style.display="block"}}(e,t),function(e,t){if(!t.primaryContentUrl)return;const n=e.getElementById("tabBootErr");if(!n)return;const r=function(e,t){let n=0,r=0;return null!=e&&(n=Math.max(e.maxWidth,e.minWidth),r=Math.max(e.maxHeight,e.minHeight)),0===n&&(n=t.public_lytebox_default_width||600),0===r&&(r=t.public_lytebox_default_height||800),{width:n,height:r}}(yt(t,s(e)||!1,"desktop"),t);!function(e,t,n){Ze("body.lyteboxed",{minWidth:`${t+60}px;`}),Ze("#centeringContainer.lyteboxed",{width:`${t}px`,marginLeft:-t/2+"px",minHeight:`${n}px`,position:"relative",top:0,left:"50%",marginTop:"30px",marginBottom:"30px",boxShadow:"2px 2px 40px rgba(0, 0, 0, 0.65)",backgroundColor:"white"}),Ze("#lyteboxClose",{position:"absolute",top:"-14px",[e.showTabs?"left":"right"]:"-14px",display:"none",zIndex:100}),Ze("#lyteboxClose a img",{border:"none"}),Ze("#primaryContent, #primaryContentLink",{position:"fixed",height:"100%",width:"100%",top:0,border:0,display:"block"}),Ze("#primaryContentLink",{backgroundColor:"rgba(0,0,0,0.4)",left:0}),Ze(".lyteboxed .wcBody .dashboardSpacer .tab-dashboard",{overflow:"hidden"})}(t,r.width,r.height);const o=e.createElement("img");o.height=27,o.width=28,o.src=he("images/close_button.png");const i=e.createElement("a");i.setAttribute("href",t.primaryContentUrl),i.appendChild(o);const a=e.createElement("div");a.setAttribute("id","lyteboxClose"),a.appendChild(i),n.after(a)}(e,t),function(e,t){t.primaryContentUrl&&(e.getElementById("primaryContentLink").href=t.primaryContentUrl)}(e,t),function(e,t){new Array(["property","fb:app_id",t.facebookAppID],["property","og:title",t.shareDescription],["property","og:type","article"],["property","og:image",t.baseViewThumbLink],["property","og:site_name","Tableau Software"],["name","twitter:card","summary"],["name","twitter:site","@tableau"],["name","twitter:title",t.workbookName],["name","twitter:description",t.shareDescription],["name","twitter:image:src",t.baseViewThumbLink],["name","twitter:domain","Tableau Public"]).forEach((t=>{const n=e.createElement("meta"),[r,o,i]=t;n.setAttribute(r,o),n.setAttribute("content",i),e.head.append(n)})),e.head.append(function(){const e=document.createElement("head");return e.setAttribute("name","twitter:creator"),e.setAttribute("id","twitter_creator"),e.setAttribute("content",""),e}())}(e,t)}(document,t),function(e){var t;e&&(M(e.metricsFilter),t=e.vizqlSessionType,N=t)}(t),oe((()=>{const{language:e}=ae(t);ze(document,e).then((e=>{!function(e,t,n){e.title=s(e)?t.AuthoringWorkbookTitle(n.workbookName):t.EmbeddedWorkbookTitle(n.workbookName)}(document,e,t)}))})))}function Tt(e){console.error(e);const t=new Be(document),n=Ee(be());ze(document,n).then((n=>{const r=n.getString("UnhandledExceptionTitle"),o=n.getString("UnhandledExceptionMessage")(void 0,e);t.overwriteTitle(r).overwriteBodyHTML(o)}),(()=>{console.error("Unable to load localized strings")})).then((()=>{t.show()}))}(()=>{if("undefined"!=typeof staticConfig&&staticConfig.isUnitTestRun)return Ct(!0,tsConfig),void xe(null);t((()=>{!function(e){if(c(e)){e.body.classList.add("public");const t=e.getElementById("svg-spinner-container");t&&(t.style.background="rgba(255,255,255,.6)")}}(document),wt(document)})),function(){const e=document.createElement("style");e.id=Xe,Je(e),document.head.appendChild(e)}(),o().then((t=>{t.isOffline?function(){return bt(this,void 0,void 0,(function*(){return Promise.resolve(kt()).then((e=>(Rt(!1,e),null)))}))}().then((()=>xe(null))).catch((e=>{Tt(e)})):function(e,t){const n=new Promise(((e,t)=>setTimeout((()=>t("Timed out after 5000 ms.")),5e3)));return Promise.race([t,n])}(0,o().then((t=>new Promise(((n,r)=>{const o=window.location!==window.parent.location;if(!t.isSalesforceNative||!o)return n(null);const i=t.parentFrameOrigin;if(!i)return r("parentFrameOrigin is not configured");window.addEventListener("message",(function(e){if("*"===i||e.origin.toLowerCase()===i.toLowerCase())return e.data&&"string"==typeof e.data.authToken?n(e.data.authToken):e.data&&e.data.parameters&&"string"==typeof e.data.parameters.authToken?n(e.data.parameters.authToken):void 0}));const s={msgGuid:e.raw(),msgType:"notification",notificationId:"ready-to-receive-auth-token",readyToReceiveAuthToken:!0};window.parent.postMessage(s,i)})))).catch((e=>(Tt(e),null)))).then((e=>(e=>{Et(St.getSessionRoute(window.location),e).then((t=>{xe(e)})).catch((e=>{Tt(e)}))})(e))).catch((e=>{Tt(e)}))})).catch((e=>{Tt(e)})),St.purge(Date.now()-3456e5).catch((e=>console.error(`Vizql storage purge failed: ${e.toString()}`)))})()})(),self.PreBootstrap=r})();