@esri/solutions-components 5.0.2-next.8 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{FLK4LATH.js → 55CA3AGN.js} +1 -1
- package/dist/cdn/{N5PYWRMD.js → C2MDLUTX.js} +1 -1
- package/dist/cdn/{HPBIBS4W.js → JIPE2UQ3.js} +1 -1
- package/dist/cdn/{6CJGNF3Y.js → KKI72ISR.js} +1 -1
- package/dist/cdn/{JQO5U72D.js → LQ3CLDU5.js} +1 -1
- package/dist/cdn/UDTF5SYU.js +2 -0
- package/dist/cdn/{ERFCQNCV.js → WDFQGUHD.js} +1 -1
- package/dist/cdn/Y4YYE2LG.js +2 -0
- package/dist/cdn/{BF65YN5N.js → YQECYE4M.js} +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/create-feature/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-deploying-dialog/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solutions-resources-shell/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/solution-deploy-dialog.js +1 -1
- package/dist/components/consent-manager/customElement.js +3 -3
- package/dist/components/public-notification/customElement.js +25 -18
- package/dist/components/solution-deployed-card-panel/customElement.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +81 -81
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +5 -8
- package/package.json +1 -1
- package/dist/cdn/2UMRDDIV.js +0 -2
- package/dist/cdn/I2FILQIE.js +0 -2
|
@@ -4,4 +4,4 @@ import{a as pn}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";i
|
|
|
4
4
|
`),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!m.has("X-Amz-Expires")&&m.set("X-Amz-Expires","86400"),m.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),m.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),m.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");S||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=pr(this.encodedPath);let O=new Set;this.encodedSearch=[...this.url.searchParams].filter(([w])=>{if(!w)return!1;if(this.service==="s3"){if(O.has(w))return!1;O.add(w)}return!0}).map(w=>w.map(v=>pr(encodeURIComponent(v)))).sort(([w,v],[A,k])=>w<A?-1:w>A?1:v<k?-1:v>k?1:0).map(w=>w.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){let t=this.datetime.slice(0,8),n=[this.secretAccessKey,t,this.region,this.service].join(),r=this.cache.get(n);if(!r){let i=await _e("AWS4"+this.secretAccessKey,t),o=await _e(i,this.region),s=await _e(o,this.service);r=await _e(s,"aws4_request"),this.cache.set(n,r)}return vt(await _e(r,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,vt(await fr(await this.canonicalString()))].join(`
|
|
5
5
|
`)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+`
|
|
6
6
|
`,this.signedHeaders,await this.hexBodyHash()].join(`
|
|
7
|
-
`)}async hexBodyHash(){let t=this.headers.get("X-Amz-Content-Sha256")||(this.service==="s3"&&this.signQuery?"UNSIGNED-PAYLOAD":null);if(t==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");t=vt(await fr(this.body||""))}return t}};async function _e(e,t){let n=await crypto.subtle.importKey("raw",typeof e=="string"?Nt.encode(e):e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",n,Nt.encode(t))}async function fr(e){return crypto.subtle.digest("SHA-256",typeof e=="string"?Nt.encode(e):e)}var dr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function vt(e){let t=new Uint8Array(e),n="";for(let r=0;r<t.length;r++){let i=t[r];n+=dr[i>>>4&15],n+=dr[i&15]}return n}function pr(e){return e.replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())}function As(e,t){let{hostname:n,pathname:r}=e;if(n.endsWith(".on.aws")){let a=n.match(/^[^.]{1,63}\.lambda-url\.([^.]{1,63})\.on\.aws$/);return a!=null?["lambda",a[1]||""]:["",""]}if(n.endsWith(".r2.cloudflarestorage.com"))return["s3","auto"];if(n.endsWith(".backblazeb2.com")){let a=n.match(/^(?:[^.]{1,63}\.)?s3\.([^.]{1,63})\.backblazeb2\.com$/);return a!=null?["s3",a[1]||""]:["",""]}let i=n.replace("dualstack.","").match(/([^.]{1,63})\.(?:([^.]{0,63})\.)?amazonaws\.com(?:\.cn)?$/),o=i&&i[1]||"",s=i&&i[2];if(s==="us-gov")s="us-gov-west-1";else if(s==="s3"||s==="s3-accelerate")s="us-east-1",o="s3";else if(o==="iot")n.startsWith("iot.")?o="execute-api":n.startsWith("data.jobs.iot.")?o="iot-jobs-data":o=r==="/mqtt"?"iotdevicegateway":"iotdata";else if(o==="autoscaling"){let a=(t.get("X-Amz-Target")||"").split(".")[0];a==="AnyScaleFrontendService"?o="application-autoscaling":a==="AnyScaleScalingPlannerFrontendService"&&(o="autoscaling-plans")}else s==null&&o.startsWith("s3-")?(s=o.slice(3).replace(/^fips-|^external-1/,""),o="s3"):o.endsWith("-fips")?o=o.slice(0,-5):s&&/-\d$/.test(o)&&!/-\d$/.test(s)&&([o,s]=[s,o]);return[Os[o]||o,s||""]}var on="Event",gr=on+"Listener";function Is(e){return function(t,n,r,i){var o=r||no,s=i||!1;if(!Z)return o;var a=et(n),u=et(t,!0);if(!u.length)throw new Error("noElements");if(!a.length)throw new Error("no"+on);var c=[];return(function p(l){l&&(c=[]);for(var x=l?"add"+gr:"remove"+gr,y=0;y<u.length;y++){var b=u[y];c[y]=l?s&&s.once?Es(o):o:c[y]||o;for(var S=0;S<a.length;S++)b[x]?b["on"+a[S]]=l?c[y]:null:b[x](a[S],c[y],s)}return p.bind(null,!l)})(e)}}function et(e,t){if(le(e))return t?et(document.querySelectorAll(e)):(n=e).split(n.indexOf(",")>-1?",":" ").map(function(s){return s.trim()});var n;if(NodeList.prototype.isPrototypeOf(e)){for(var r=[],i=e.length>>>0;i--;)r[i]=e[i];return r}var o=yo(e);return t?o.map(function(s){return le(s)?et(s,!0):s}).flat():o}function Es(e,t){var n;return function(){return e&&(n=e.apply(this,arguments),e=null),n}}var bt=Is(on);function ci(e,t){return Z&&ee(window[e])?(n=window[e],r=t,(i=window)===void 0&&(i=null),ee(n)?function(){n.apply(i,arguments),r.apply(i,arguments)}:r):window[e]=t;var n,r,i}ci.bind(null,"onerror");ci.bind(null,"onload");var li=typeof window>"u",hr="hidden";function Ps(e){if(li)return!1;var t=js(),n="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),r=function(){return e(!!document[t])},i=function(){return document.addEventListener(n,r)};return i(),function(){return document.removeEventListener(n,r),i}}function js(){var e=["webkit","moz","ms","o"];return li||hr in document?hr:e.reduce(function(t,n){var r=n+"Hidden";return!t&&r in document?r:t},null)}var Ts=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ns(e,t){t===void 0&&(t={});var n=(function(s,a){var u=this,c=!1;return function(p){c||(s.call(u,p),c=!0,setTimeout(function(){return c=!1},a))}})(e,t.throttle||1e4),r=[];function i(){var s=Ps(function(a){a||n({type:"tabVisible"})});return r=[s].concat(Ts.map(function(a){return bt(document,a,n)})).concat(bt(window,"load",n)).concat(bt(window,"scroll",n,{capture:!0,passive:!0})),o}function o(){r.map(function(s){return s()})}return i(),function(){return o(),i}}function _s(e){var t,n,r=e.onIdle,i=e.onWakeUp,o=e.onHeartbeat,s=e.timeout,a=s,u=e.throttle,c=u,p=!1,l=!1,x=new Date,y=function(){return clearTimeout(t)};function b(h){y(),o&&!p&&o(Ce(x),h),i&&p&&(p=!1,i(Ce(n),h),x=new Date),t=setTimeout(function(){p=!0,r&&(n=new Date,r(Ce(x),h))},a)}var S=Ns(b,{throttle:c});return{disable:function(){l=!0,p=!1,y();var h=S();return function(){return l=!1,x=new Date,b({type:"load"}),h()}},getStatus:function(){return{isIdle:p,isDisabled:l,active:p?0:Ce(x,l),idle:p?Ce(n,l):0}}}}function Ce(e,t){return t?0:Math.round((new Date-e)/1e3)}var fi="object",Cs="string",mr="?",F="name",B="version",Ms="",yr="function",Us="undefined",Ds="BlackBerry",Rs="Chrome",zs="Firefox",vr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ls=[[/microsoft (windows) (vista|xp)/i],[F,B],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[F,[B,br,vr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[F,"Windows"],[B,br,vr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[F,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[F,"MacOS"],[B,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,F],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[F,B],[/\(bb(10);/i],[B,[F,Ds]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[F,zs+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[B,[F,"webOS"]],[/crkey\/([\d\.]+)/i],[B,[F,Rs+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[F,"Chromium OS"],B],[/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/(unix) ?([\w\.]*)/i],[F,B]];function $s(e,t){for(var n=0,r,i,o,s,a,u;n<t.length&&!a;){var c=t[n],p=t[n+1];for(r=i=0;r<c.length&&!a;)if(a=c[r++].exec(e),a)for(o=0;o<p.length;o++)u=a[++i],s=p[o],te(s)===fi&&s.length>0?s.length==2?te(s[1])==yr?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length==3?te(s[1])===yr&&!(s[1].exec&&s[1].test)?this[s[0]]=u?s[1].call(this,u,s[2]):void 0:this[s[0]]=u?u.replace(s[1],s[2]):void 0:s.length==4&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):void 0):this[s]=u||void 0;n+=2}}function br(e,t){for(var n in t)if(te(t[n])===fi&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(wr(t[n][r],e))return n===mr?void 0:n}else if(wr(t[n],e))return n===mr?void 0:n;return e}function wr(e,t){return te(e)===Cs?xr(t).indexOf(xr(e))!==-1:!1}function xr(e){return e.toLowerCase()}function Vs(e){var t=(typeof window>"u"?"undefined":te(window))!==Us&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:Ms,n={};return n[F]=void 0,n[B]=void 0,$s.call(n,t,Ls),n}var di="Brave";function sn(){if(typeof window>"u")return{};if(!window.navigator)return{};var e=window.navigator,t=e.platform,n=e.product,r=e.vendor,i=Hs(window.navigator),o=i.type,s=i.version,a=o===di?o:(r||"").split(" ")[0];return{platform:t,os:Vs(),make:a||n,model:o,version:s,name:[o,s].join("/"),language:Ws(),timezone:qs()}}function Ws(){var e=window.navigator,t=e.language,n=e.browserLanguage,r=e.languages;return(t||n||(r||["en_US"])[0]).toLowerCase().replace("-","_")}function qs(){var e=/\(([A-Za-z\s].*)\)/.exec(new Date().toString());return e&&e[1]||""}function Hs(e){var t=e.userAgent,n=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(t);if(n)return{type:n[1],version:n[2]};var r=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(t);if(r)return{type:r[1],version:r[2]};var i=/(headlesschrome)(?:\/([\w\.]+)| )/i.exec(t);if(i)return{type:i[1],version:i[2]};var o=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(t);if(o){var s=e.brave&&e.brave.isBrave||!1;return{type:s?di:o[1],version:o[2]}}var a=/.+(Safari)\/([0-9\.]+).*/i.exec(t);if(a)return{type:a[1],version:a[2]};var u=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(t);if(u)return{type:u[1],version:u[2]};var c=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(t),p=c||["","NA","0.0.0"];return{type:p[1],version:p[2]}}function Ks(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t[e]||e}function Mt(e){return Ut.apply(this,arguments)}function Ut(){return Ut=re(K.mark(function e(t){var n,r,i,o,s,a,u=arguments;return K.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:n=u.length>1&&u[1]!==void 0?u[1]:!1,r={},c.t0=K.keys(t);case 3:if((c.t1=c.t0()).done){c.next=13;break}return i=c.t1.value,o=Array.isArray(t[i])?t[i]:[t[i]],s=n?o:o[0],c.next=9,gi(s,Gs);case 9:a=c.sent,hi(a)||(r[i]=a),c.next=3;break;case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}},e)})),Ut.apply(this,arguments)}function pi(e){return Dt.apply(this,arguments)}function Dt(){return Dt=re(K.mark(function e(t){var n,r;return K.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:n={},i.t0=K.keys(t);case 2:if((i.t1=i.t0()).done){i.next=9;break}return r=i.t1.value,i.next=6,gi(t[r],Js);case 6:n[r]=i.sent,i.next=2;break;case 9:return i.abrupt("return",n);case 10:case"end":return i.stop()}},e)})),Dt.apply(this,arguments)}function gi(e,t){return Rt.apply(this,arguments)}function Rt(){return Rt=re(K.mark(function e(t,n){return K.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(typeof t!="function"){r.next=4;break}return r.next=3,t();case 3:t=r.sent;case 4:return r.abrupt("return",n(t));case 5:case"end":return r.stop()}},e)})),Rt.apply(this,arguments)}function Gs(e){if(e!=null)return Array.isArray(e)?e.filter(Xs).map(function(t){return t.toString()}):hi(e)?e:e.toString()}function Js(e){return parseFloat(Number(Array.isArray(e)?e[0]:e))}function Xs(e){return e!==null&&typeof e<"u"}function hi(e){return e==null}var zt="_session.start",ut="_session.stop",mi="pageView";function Fs(e){return Lt.apply(this,arguments)}function Lt(){return Lt=re(K.mark(function e(t){var n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A,k,C,M,P,z,U,q,$,E,H,D=arguments;return K.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(n=D.length>1&&D[1]!==void 0?D[1]:{},r=D.length>2&&D[2]!==void 0?D[2]:{},i=r.appTitle,o=r.appPackageName,s=r.appVersionCode,a=r.eventMapping,u=r.enrichEventAttributes,c=r.enrichEventMetrics,p=r.debug,l=p?console.log:function(){},x=Ks(t,a),y=Le(),b=n.sessionId||y.id,S=n.sessionStart||y.createdAt,h=n.sessionStart?new Date(n.sessionStart).getTime():y.created,l("event sessionData ",JSON.stringify(y)),be&&(f=rn(),m=ui(),l("event pageSessionInfo",JSON.stringify(f)),l("event tabSessionData ",JSON.stringify(m))),O=n.attributes||{},w=n.eventId||xe(),v=n.time?new Date(n.time):new Date,A=v.toISOString(),k=v.getTime()-h,C=J({date:A,sessionId:b},be?{pageSession:f.id}:{}),!u){N.next=23;break}return N.next=20,u();case 20:N.t0=N.sent,N.next=24;break;case 23:N.t0={};case 24:if(M=N.t0,P=J(J(J({},C),M),O),z=n.metrics||{},U={sessionTime:y.elapsed||k,hour:v.getHours(),day:v.getDay()+1,month:v.getMonth()+1,year:v.getFullYear()},!c){N.next=34;break}return N.next=31,c();case 31:N.t1=N.sent,N.next=35;break;case 34:N.t1={};case 35:return q=N.t1,$=J(J(J({},U),q),z),N.next=39,Mt(P);case 39:return N.t2=N.sent,N.next=42,pi($);case 42:return N.t3=N.sent,E={attributes:N.t2,metrics:N.t3},l("".concat(w,":").concat(x)),l("eventAttributes",E.attributes),l("eventMetrics",E.metrics),be&&l("clientInfo",sn()),H=tn({},w,J(J({EventType:x,Timestamp:A,AppPackageName:o,AppTitle:i},s?{AppVersionCode:s}:{}),{},{Attributes:E.attributes,Metrics:E.metrics,Session:{Id:b,StartTimestamp:S}})),t===ut&&(H[w].Session.Duration=k,H[w].Session.StopTimestamp=A),N.abrupt("return",H);case 51:case"end":return N.stop()}},e)})),Lt.apply(this,arguments)}var Bs="__endpoint";function ct(e){return"".concat(Bs,".").concat(e)}var Sr="__endpoint",Or=!1;function an(){return $t.apply(this,arguments)}function $t(){return $t=re(K.mark(function e(){var t,n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A=arguments;return K.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return t=A.length>0&&A[0]!==void 0?A[0]:{},n=A.length>1&&A[1]!==void 0?A[1]:{},r=n.getUserId,i=n.getEndpointId,o=n.endpointMigration,s=ra(n),a=s.sessionKey?s.sessionKey():"sessions",u=s.pageViewKey?s.pageViewKey():"pageViews",be&&(l=sn(),c=rn(),p=c.id),x=Le(),k.next=10,i();case 10:if(y=k.sent,Or||(Or=!0,b=Ft(Sr),b&&(wt(y,b),Qr(Sr))),S=Qs(y),h=ta(n),f=Ys(h,l),m={Attributes:{},Demographic:f,Location:{},Metrics:{}},be&&(l.device&&l.device.vendor&&(m.Attributes.DeviceMake=[l.device.vendor]),l.device&&l.device.model&&(m.Attributes.DeviceModel=[l.device.model]),l.device&&l.device.type&&(m.Attributes.DeviceType=[l.device.type])),t=Ss.all([S,m,t],{arrayMerge:na}),!(t.User&&t.User.UserId)){k.next=23;break}return k.next=21,r();case 21:O=k.sent,t.User.UserId!==O&&(t.User.UserId=O);case 23:if(!(!t.User||!t.User.UserId)){k.next=28;break}return k.next=26,r();case 26:w=k.sent,w&&(t.User=t.User||{},t.User.UserId=w);case 28:if(!(t.User&&t.User.UserAttributes)){k.next=32;break}return k.next=31,Mt(t.User.UserAttributes,!0);case 31:t.User.UserAttributes=k.sent;case 32:return k.next=34,Mt(t.Attributes,!0);case 34:return t.Attributes=k.sent,k.next=37,pi(t.Metrics);case 37:if(t.Metrics=k.sent,t.Metrics[a]||(t.Metrics[a]=1),t.Metrics[u]||(t.Metrics[u]=1),o&&(t=o(y,t)),v=t.Attributes.lastSession,v){k.next=47;break}return t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],p&&(t.Attributes.lastPageSession=[p]),k.abrupt("return",wt(y,t));case 47:return v&&v[0]!==x.id&&(t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],t.Metrics[a]+=1),t.Attributes&&t.Attributes.lastPageSession&&Array.isArray(t.Attributes.lastPageSession)&&t.Attributes.lastPageSession.length>0&&t.Attributes.lastPageSession[0]!==p&&(t.Attributes.lastPageSession=[p],t.Metrics[u]+=1),k.abrupt("return",wt(y,t));case 50:case"end":return k.stop()}},e)})),$t.apply(this,arguments)}function wt(e,t){var n=ct(e),r=bs(t)?t:JSON.stringify(t);return Xo(n,r),t}function Qs(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function Ys(e,t){return be?ea(e,t):Zs(e)}function Zs(e){var t={AppVersion:e,Make:"generic server",Platform:"Node.js",PlatformVersion:process.version};return t}function ea(e,t){var n={AppVersion:e,Locale:t.language,Make:t.make,Model:t.model,ModelVersion:t.version,Platform:t.os.name||t.platform};return t.os&&t.os.version&&(n.PlatformVersion=t.os.version),n}function ta(e){var t=e.appTitle||e.appPackageName||"",n=e.appVersionCode||"0.0.0";return t?"".concat(t,"@").concat(n):n}function na(e,t){return t}function ra(e){var t=e.getContext;return typeof t=="function"?t():t}function ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function(){var n=re(K.mark(function i(o){var s,a,u,c,p=arguments;return K.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return s=p.length>1&&p[1]!==void 0?p[1]:{},a=p.length>2&&p[2]!==void 0?p[2]:{},u=p.length>3&&p[3]!==void 0?p[3]:!1,cr(s)&&(s={},u=s),cr(a)&&(a={},u=a),l.next=7,Fs(o,s,t);case 7:if(c=l.sent,!(Object.entries(a).length||o===mi)){l.next=12;break}return l.next=11,an(a,t);case 11:a=l.sent;case 12:if(e.push(c),!u){l.next=17;break}return l.abrupt("return",e.flush());case 17:case"end":return l.stop()}},i)}));function r(i){return n.apply(this,arguments)}return r})()}var kr,oa=[429,500],sa=[202],aa=400;function ua(e,t){return Vt.apply(this,arguments)}function Vt(){return Vt=re(K.mark(function e(t,n){var r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v;return K.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return r=n.pinpointRegion,i=n.pinpointAppId,o=n.lambdaArn,s=n.lambdaRegion,a=n.credentials,u=n.getCredentials,c=n.debug,A.next=3,ca(a,u);case 3:return p=A.sent,c&&console.log("pinpoint auth",p),l=s||r,x=r||s,y=n.fips===!0?"-fips":"",b="https://lambda.".concat(l,".amazonaws.com/2015-03-31/functions/").concat(o,"/invocations"),S="https://pinpoint".concat(y,".").concat(x,".amazonaws.com/v1/apps/").concat(i,"/events"),h=o?b:S,O={body:JSON.stringify(t)},f=new _t(p),A.next=16,f.fetch(h,O).then(function(k){return k.json()});case 16:m=A.sent,A.next=24;break;case 19:return f=new kr.PinpointClient({credentials:p,region:r}),w=new kr.PutEventsCommand({ApplicationId:i,EventsRequest:t}),A.next=23,f.send(w);case 23:m=A.sent;case 24:return m&&m.Results&&(v=Object.keys(m.Results).map(function(k){return m.Results[k]}),v.forEach(function(k){var C=k.EndpointItemResponse||{},M=k.EventsItemResponse||{};Object.keys(C).length&&(sa.includes(C.StatusCode)||oa.includes(C.StatusCode)||la(C,Endpoint));var P=Object.keys(M);P.length&&P.forEach(function(z){})})),A.abrupt("return",m);case 26:case"end":return A.stop()}},e)})),Vt.apply(this,arguments)}function ca(e,t){return Wt.apply(this,arguments)}function Wt(){return Wt=re(K.mark(function e(t,n){var r,i;return K.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r=t,!(!Object.keys(r).length&&n)){o.next=11;break}return o.prev=2,o.next=5,n();case 5:r=o.sent,o.next=11;break;case 8:throw o.prev=8,o.t0=o.catch(2),new Error(o.t0);case 11:return i={accessKeyId:r.accessKeyId||r.AccessKeyId,secretAccessKey:r.secretAccessKey||r.SecretKey,sessionToken:r.sessionToken||r.SessionToken,retries:5},o.abrupt("return",i);case 13:case"end":return o.stop()}},e,null,[[2,8]])})),Wt.apply(this,arguments)}function la(e,t){var n=e.StatusCode,r=e.Message;if(n===aa){if(r.startsWith("Missing ChannelType"))throw new Error("Missing ChannelType");if(r.startsWith("Exceeded maximum endpoint per user count"))throw new Error("Exceeded maximum endpoint per user count")}}var fa=["PUSH","GCM","APNS","APNS_SANDBOX","APNS_VOIP","APNS_VOIP_SANDBOX","ADM","SMS","VOICE","EMAIL","BAIDU","CUSTOM"],xt=fa.reduce(function(e,t){return e[t]=t,e},{}),da=sn(),Ar=zt,Ir=ut,pa=/.+\@.+\..+/;function ga(e){return pa.test(e)}function ha(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getEndpointId,n=e.debug;return(function(){var r=re(K.mark(function o(){var s,a,u,c,p,l,x,y,b,S,h=arguments;return K.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=h.length>0&&h[0]!==void 0?h[0]:[],a=h.length>1&&h[1]!==void 0?h[1]:{},f.next=4,t();case 4:if(u=f.sent,u){f.next=8;break}return console.error("No endpoint id. check getEndpointId()"),f.abrupt("return");case 8:if(c=te(a)==="object"&&Object.keys(a).length,c){f.next=13;break}f.t0=ma(u),f.next=16;break;case 13:return f.next=15,an(a,e);case 15:f.t0=f.sent;case 16:return p=f.t0,l=p.ChannelType,p.Address&&ga(p.Address)&&(l=xt.EMAIL),!l&&p.Address&&(da.platform==="android"?l=l||xt.GCM:l=l||xt.APNS),n&&(console.log("Endpoint",p),console.log("CHANNEL_TYPE",l)),p.RequestId=xe(),p.ChannelType=l,p.Address&&(p.OptOut=p.OptOut||"NONE"),x=ya(s),y=va(u,p,x),f.prev=26,f.next=29,ua(y,e);case 29:b=f.sent,f.next=36;break;case 32:f.prev=32,f.t1=f.catch(26),console.log("Error calling AWS",f.t1),S=f.t1;case 36:return f.abrupt("return",{endpoint:p,response:b,error:S,events:s});case 37:case"end":return f.stop()}},o,null,[[26,32]])}));function i(){return r.apply(this,arguments)}return i})()}function ma(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function ya(e){return e.sort(function(t,n){var r=t.EventType,i=n.EventType;if(r==Ar)return-1;if(i==Ar||r==Ir)return 1;if(i==Ir)return-1}).reduce(function(t,n){return J(J({},n),t)},{})}function va(e,t,n){return{BatchItem:tn({},e,{Endpoint:t,Events:n})}}var ba=ut;function yi(){return{}}function wa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=J({getContext:e.getContext||yi,credentials:e.credentials||{},getEndpointId:e.getEndpointId},e),n=t.debug?console.log:function(){},r=ha(t),i=hs((function(){var u=re(K.mark(function c(p,l){var x;return K.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p.forEach(function(b){return n("> Queue event",b)}),y.next=3,r(p,{});case 3:x=y.sent,n("> Queue response",x);case 5:case"end":return y.stop()}},c)}));return function(c,p){return u.apply(this,arguments)}})(),{max:10,interval:e.flushInterval||3e3,throttle:!0}),o=ia(i,t);an({},e);var s=xa(o);function a(u){return r([],u)}return{updateEndpoint:a,recordEvent:o,disable:function(){s()}}}function xa(e){if(!be)return yi;var t=Sa(e);return window.addEventListener("beforeunload",t),function(){return window.removeEventListener("beforeunload",t)}}function Sa(e){return function(){e(ba,!0)}}function St(){throw new Error("Pinpoint not loaded")}function Oa(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return typeof r=="number"&&(t.metrics[n]=r),(typeof r=="string"||typeof r=="boolean")&&(t.attributes[n]=r),t},{attributes:{},metrics:{}})}function ka(e){var t=e.config,n=e.instance;t&&t.disableAnonymousTraffic&&!n.user("userId")&&n.once("identifyStart",function(r){var i=r.plugins,o=i["aws-pinpoint"];o.loaded()||n.loadPlugin("aws-pinpoint")})}var Aa={disableAnonymousTraffic:!1,pinpointRegion:"us-east-1",eventMapping:{}};function Ia(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t,n,r=!1;function i(){var s=Le();e.debug&&console.log("Stop session",s),t(ut,!0)}function o(){var s=Ze(30);e.debug&&console.log("START SESSION",s),t(zt)}return{name:"aws-pinpoint",config:J(J({},Aa),e),bootstrap:ka,initialize:function(s){var a=s.config,u=s.instance,c=a.disableAnonymousTraffic,p=a.debug,l=p?console.log:function(){},x=u.getState(),y=x.user||{},b=y.userId,S=y.anonymousId,h=x.context||{},f=h.app,m=h.version,O=h.campaign,w=rn(),v=ui(),A=Le();if(l("initPageSession",w),l("initTabSession",v),l("initSessionData",A),A&&A.anonId&&A.anonId!==S){l("anonId different refresh session details"),ur(),vs();var k=Ze(30,{anonId:S,userId:b});l("newSessionForNewUser",k)}if(!b&&c)return!1;var C=Object.keys(O).reduce(function(U,q){return U["utm_".concat(q)]=O[q],U},{}),M=wa(J(J({},a),{},{appTitle:a.appTitle||f,appPackageName:a.appPackageName||f,appVersionCode:a.appVersionCode||m,eventMapping:a.eventMapping,getEndpointId:function(){return u.user("anonymousId")},getUserId:function(){return u.user("userId")},getContext:function(){return{sessionKey:a.sessionKey,pageViewKey:a.pageViewKey,initialSession:A}},enrichEventAttributes:function(){return J({anonId:u.user("anonymousId"),userId:u.user("userId"),hash:window.location.hash,path:window.location.pathname,referrer:document.referrer,search:window.location.search,title:document.title,host:window.location.hostname,url:window.location.origin+window.location.pathname},C)},enrichUserAttributes:a.enrichUserAttributes,enrichEventMetrics:function(){return{}}}));t=M.recordEvent,n=M.updateEndpoint,A&&A.isNew&&(l("Start brand new session because cookie not found"),t(zt));var P=18e5,z=P;_s({timeout:z,throttle:2e4,onIdle:function(U,q){l("Session idle. Active ".concat(U," seconds")),i()},onWakeUp:function(U,q){l("Session wakeup. Idle ".concat(U," seconds")),o()},onHeartbeat:function(U,q){l("ping session",new Date),l("total active time",U);var $=u.user();ys(30,{anonId:$.anonymousId,userId:$.userId})}})},page:function(s){if(s.payload,s.config,!t)return St();r&&ur(),t(mi),r=!0},track:function(s){var a=s.payload,u=s.config;if(s.instance,!t)return St();if(!(u.disableAnonymousTraffic&&!a.userId)){var c=Oa(a.properties);t(a.event,c)}},identify:function(s){var a=s.payload,u=a.userId,c=a.traits;if(!n)return St();var p={},l={};u&&(l.UserId=u),c&&Object.keys(c).length&&(l.UserAttributes=c),Object.keys(l).length&&(p.User=l),n(p,!0)},reset:function(s){var a=s.instance,u=a.user("anonymousId"),c=ct(u);Qr(c)},loaded:function(){return!!t}}}var Ea=Ia;function vi(e){return Object.keys(e).some(t=>{let n=e[t];if(!n)return!1;switch(n&&n.toParam&&(n=n.toParam()),n.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function bi(e){let t={};return Object.keys(e).forEach(n=>{var r,i;let o=e[n];if(o&&o.toParam&&(o=o.toParam()),!o&&o!==0&&typeof o!="boolean"&&typeof o!="string")return;let s=o.constructor.name,a;switch(s){case"Array":let u=(i=(r=o[0])===null||r===void 0?void 0:r.constructor)===null||i===void 0?void 0:i.name;a=u==="Array"?o:u==="Object"?JSON.stringify(o):o.join(",");break;case"Object":a=JSON.stringify(o);break;case"Date":a=o.valueOf();break;case"Function":a=null;break;case"Boolean":a=o+"";break;default:a=o;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(t[n]=a)}),t}function wi(e,t){return Array.isArray(t)&&t[0]&&Array.isArray(t[0])?t.map(n=>wi(e,n)).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}function xi(e){let t=bi(e);return Object.keys(t).map(n=>wi(n,t[n])).join("&")}var Pa=globalThis.FormData;function ja(e,t){let n=vi(e)||t,r=bi(e);if(n){let i=new Pa;return Object.keys(r).forEach(o=>{if(typeof Blob<"u"&&r[o]instanceof Blob){let s=r.fileName||r[o].name||o;i.append(o,r[o],s)}else i.append(o,r[o])}),i}else return xi(e)}var de=class extends Error{constructor(t,n,r,i,o){super(t);let s=new.target.prototype;Object.setPrototypeOf(this,s),t=t||"UNKNOWN_ERROR",n=n||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=n==="UNKNOWN_ERROR_CODE"?t:`${n}: ${t}`,this.originalMessage=t,this.code=n,this.response=r,this.url=i,this.options=o}},Ta={noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}},qt="ARCGIS_REST_JS_NO_CORS";globalThis[qt]||(globalThis[qt]=Object.assign({},Ta));var Y=globalThis[qt];function Na(e){let t=new URL(e);e=t.origin+t.pathname,t.search.includes("f=json")&&(e+="?f=json");let n=t.origin;return Y.pendingNoCorsRequests[n]||(Y.pendingNoCorsRequests[n]=fetch(e,{mode:"no-cors",credentials:"include",cache:"no-store"}).then(r=>{Y.noCorsDomains.indexOf(n)===-1&&Y.noCorsDomains.push(n),Y.crossOriginNoCorsDomains[n.toLowerCase()]=Date.now(),delete Y.pendingNoCorsRequests[n]}).catch(r=>(delete Y.pendingNoCorsRequests[n],Promise.reject(new Error(`no-cors request to ${n} failed`))))),Y.pendingNoCorsRequests[n]}function _a(e){e.forEach(t=>{t=t.toLowerCase(),/^https?:\/\//.test(t)?Ot(t):(Ot("http://"+t),Ot("https://"+t))})}function Ot(e){let t=new URL(e).origin;Y.noCorsDomains.indexOf(t)===-1&&Y.noCorsDomains.push(t)}function Si(e){let t=!1;if(Y.noCorsDomains.length){let n=new URL(e).origin.toLowerCase();t=Y.noCorsDomains.some(r=>n.includes(r))}return t}function Ca(e){let t=!1;if(Si(e)){let n=new URL(e).origin.toLowerCase(),r=Y.crossOriginNoCorsDomains[n]||0;Date.now()-60*6e4>r&&(t=!0)}return t}function Ma(e){console&&console.warn&&console.warn.apply(console,[e])}function Ua(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}function Da(e,t){var n;if(!t&&!window||!e)return!1;{t=t||window;let r=(n=t.location)===null||n===void 0?void 0:n.origin;return e.startsWith(r)}}var Ra="@esri/arcgis-rest-js";function za(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var tt=class extends de{constructor(t="AUTHENTICATION_ERROR",n="AUTHENTICATION_ERROR_CODE",r,i,o){super(t,n,r,i,o),this.name="ArcGISAuthError",this.message=n==="AUTHENTICATION_ERROR_CODE"?t:`${n}: ${t}`;let s=new.target.prototype;Object.setPrototypeOf(this,s)}retry(t,n=1){let r=0,i=(o,s)=>{r=r+1,t(this.url,this.options).then(a=>{let u=Object.assign(Object.assign({},this.options),{authentication:a});return Oi(this.url,u)}).then(a=>{o(a)}).catch(a=>{a.name==="ArcGISAuthError"&&r<n?i(o,s):a.name===this.name&&a.message===this.message&&r>=n?s(this):s(a)})};return new Promise((o,s)=>{i(o,s)})}};function La(e,t,n,r,i){if(e.code>=400){let{message:o,code:s}=e;throw new de(o,s,e,t,r)}if(e.error){let{message:o,code:s,messageCode:a}=e.error,u=a||s||"UNKNOWN_ERROR_CODE";throw s===498||s===499?i||new tt(o,u,e,t,r):new de(o,u,e,t,r)}if(e.status==="failed"||e.status==="failure"){let o,s="UNKNOWN_ERROR_CODE";try{o=JSON.parse(e.statusMessage).message,s=JSON.parse(e.statusMessage).code}catch{o=e.statusMessage||e.message}throw new de(o,s,e,t,r)}return e}function Oi(e,t){let n=za(),r=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},n),t),{params:Object.assign(Object.assign({},n.params),t.params),headers:Object.assign(Object.assign({},n.headers),t.headers)}),{httpMethod:i,rawResponse:o}=r,s=Object.assign({f:"json"},r.params),a=null,u={method:i,signal:r.signal,credentials:r.credentials||"same-origin"};Si(e)&&(u.credentials="include"),r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let c;if(typeof r.authentication=="string"){let b=r.authentication;c={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(b)},!r.authentication.startsWith("AAPK")&&!r.authentication.startsWith("AAPT")&&!r.authentication.startsWith("AATK")&&!r.authentication.startsWith("AAST")&&!r.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(Ma("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else c=r.authentication;let p=e,l=!1;typeof window<"u"&&(l=Da(e));let x=!l&&Ca(e);r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let y=Promise.resolve();return x&&(u.credentials="include",y=Na(e)),y.then(()=>c?c.getToken(e).catch(b=>(b.url=e,b.options=r,a=b,Promise.resolve(""))):Promise.resolve("")).then(b=>{b.length&&(s.token=b),c&&c.getDomainCredentials&&(u.credentials=c.getDomainCredentials(e));let S={};if(u.method==="GET"){s.token&&r.hideToken&&typeof window>"u"&&(S["X-Esri-Authorization"]=`Bearer ${s.token}`,delete s.token);let f=xi(s),m=f===""?e:`${e}?${f}`;r.maxUrlLength&&m.length>r.maxUrlLength||!r.maxUrlLength&&m.length>2e3||s.token&&r.hideToken?(u.method="POST",b.length&&r.hideToken&&(s.token=b,delete S["X-Esri-Authorization"])):e=m}let h=new RegExp("/items/.+/updateResources").test(e);return u.method==="POST"&&(u.body=ja(s,h)),u.headers=Object.assign(Object.assign({},S),r.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=Ra),!vi(s)&&!h&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(e,u):Ua().then(({fetch:f})=>f(e,u))}).then(b=>{if(!b.ok)return b.json().then(S=>{let{status:h,statusText:f}=b,{message:m,details:O}=S.error,w=`${m}. ${O?O.join(" "):""}`.trim();throw new de(w,`HTTP ${h} ${f}`,S,e,r)}).catch(S=>{if(S.name==="ArcGISRequestError")throw S;let{status:h,statusText:f}=b;throw new de(f,`HTTP ${h}`,b,e,r)});if(o)return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."),b;switch(s.f){case"json":return b.json();case"geojson":return b.json();case"html":return b.text();case"text":return b.text();default:return b.blob()}}).then(b=>{if((s.f==="json"||s.f==="geojson")&&!o){let S=La(b,p,s,r,a);if(b&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(e)&&Array.isArray(b.authorizedCrossOriginNoCorsDomains)&&_a(b.authorizedCrossOriginNoCorsDomains),a){let h=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];r.authentication.federatedServers[h]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return S}else return b})}function ki(e,t={params:{f:"json"}}){let{request:n}=t,r=Gt(t,["request"]);return n?n(e,r):Oi(e,r).catch(i=>i instanceof tt&&t.authentication&&typeof t.authentication!="string"&&t.authentication.canRefresh&&t.authentication.refreshCredentials?i.retry(()=>t.authentication.refreshCredentials(),1):Promise.reject(i))}function $a(e){return typeof e!="string"||(e=e.trim(),e[e.length-1]==="/"&&(e=e.slice(0,-1))),e}function Re(e={}){return e.portal?$a(e.portal):e.authentication&&typeof e.authentication!="string"?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function Va(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function Wa(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])}function qa(e){return e.join(",")}function Ai(e,t,n){if(!e)return e;let r=null;return typeof e.thumbnail=="string"&&(r=`${t}/content/items/${e.id}/info/${e.thumbnail}`,r&&e.access!=="public"&&n&&(r+=`?${n}`)),Object.assign(Object.assign({},e),r?{thumbnailUrl:r}:{})}function Ha(e){return Va(e).then(t=>{let n=e.folderId?`${Re(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${Re(e)}/content/users/${t}/items/${e.item.id}/update`;e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&Wa(e.params.extent)&&(e.params.extent=qa(e.params.extent));let r=Re(e),i=Ai(Object.assign(Object.assign({},e.item),{access:e.item.access}),r),o=e.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof o=="string"&&i.thumbnailUrl.split("?")[0]===o.split("?")[0]&&delete e.params.thumbnailUrl,ki(n,e)})}function Ii(e,t){let n=Ka(e,t),r=Object.assign({httpMethod:"GET"},t);return ki(n,r).then(async i=>{let o=t?.portal||Re(t),s;return t?.authentication&&typeof t.authentication!="string"&&i.access!=="public"&&(s=await t.authentication.getToken(n)),Ai(i,o,s)})}var Ka=(e,t)=>`${typeof t=="string"?t:Re(t)}/content/items/${e}`;function Ga(e,t,n){return n.reduce((r,i)=>{let{action:o,targetProperty:s}=i;return o==="add"?r[s]={updatedAt:new Date,updatedBy:e}:o==="remove"&&delete r[s],r},t)}async function Ja({id:e,authentication:t,username:n,accessChangeset:r}){let{properties:i={}}=await Ii(e,{authentication:t}),o=i.telemetry,s=o===void 0?{}:o,{arcgis:{access:a={}}={}}=s,u=Gt(s,["arcgis"]),c=Ga(n,a,r);return Ha({item:{id:e,properties:Object.assign(Object.assign({},i),{telemetry:Object.assign(Object.assign({},u),{arcgis:{access:Object.assign({},c)}})})},authentication:t})}async function Xa({id:e,authentication:t}){let{properties:{telemetry:{arcgis:{access:n={}}={}}={}}}=await Ii(e,{authentication:t});return{access:n}}var Ht=class{constructor(t){this.name="amazon",this.isInitialized=!1;let{app:n={},fips:r,userPoolID:i}=t;this.analytics=os({app:n.name,version:n.version,plugins:[Ea({fips:r,pinpointAppId:n.id,getCredentials:()=>Wi(i,{fips:r})})]}),Object.assign(this,t)}init(){if(!this.isInitialized)return this.isInitialized=!0,Promise.resolve()}static async setAccessPermissions({id:t,authentication:n,username:r,accessChangeset:i}){return Ja({id:t,authentication:n,username:r,accessChangeset:i})}static async getAccessPermissions({id:t,authentication:n}){return Xa({id:t,authentication:n})}logPageView(t,n){let r=Xi({page:t,previousPage:this.previousPage,options:n,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{pageUrl:i,pageName:o}=r;this.previousPage={pageUrl:i,pageName:o},this.analytics.track("pageView",r)}logEvent(t={}){let n=Ji({event:t,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{name:r}=n;this.analytics.track(r,n)}},Fa=cn`:host{display:block}`,Kt=class extends fn{constructor(){super(...arguments),this.amazonAppId="",this.amazonAppName="",this.amazonUserPoolID="",this.amazonVersion="",this.firstUseVar="",this.measurementIds=[],this._open=!1,this._translations=pn({name:"consent-manager",blocking:!0}),this._loaded=!1,this.consentGranted=ln()}static{this.properties={amazonAppId:1,amazonAppName:1,amazonUserPoolID:1,amazonVersion:1,firstUseVar:1,measurementIds:0,portal:0,_open:16,_translations:16}}static{this.styles=Fa}async getInstance(){if(localStorage.getItem(this.firstUseVar)==="true"||this.portal?.eueiEnabled)return await this._init(),this._telemetryInstance}async load(){this._open=localStorage.getItem(this.firstUseVar)===null}render(){return""}loaded(){this.consentGranted.emit({granted:localStorage.getItem(this.firstUseVar)==="true"})}async _init(){if(!this._loaded){let t={info:console.info.bind(console),error:console.error.bind(console),warn:(r,...i)=>{(!r.includes("non-primitive value")||!r.includes("userSince"))&&console.warn(r,...i)}},n={plugins:[],portal:this.portal,logger:t};if(this.measurementIds?.length>0){let r=new At({measurementIds:this.measurementIds});n.plugins.push(r)}if(this.amazonUserPoolID){let r=new Ht({userPoolID:this.amazonUserPoolID,app:{name:this.amazonAppName,id:this.amazonAppId,version:this.amazonVersion}});n.plugins.push(r)}this._telemetryInstance=new kt(n),await this._telemetryInstance.init(),this._loaded=!0}}_alertClosed(){this._open=!1,localStorage.getItem(this.firstUseVar)!=="true"&&localStorage.setItem(this.firstUseVar,"false")}_accept(){localStorage.setItem(this.firstUseVar,"true"),this.consentGranted.emit({granted:!0}),this._open=!1}};dn("consent-manager",Kt);export{Kt as ConsentManager};
|
|
7
|
+
`)}async hexBodyHash(){let t=this.headers.get("X-Amz-Content-Sha256")||(this.service==="s3"&&this.signQuery?"UNSIGNED-PAYLOAD":null);if(t==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");t=vt(await fr(this.body||""))}return t}};async function _e(e,t){let n=await crypto.subtle.importKey("raw",typeof e=="string"?Nt.encode(e):e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",n,Nt.encode(t))}async function fr(e){return crypto.subtle.digest("SHA-256",typeof e=="string"?Nt.encode(e):e)}var dr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function vt(e){let t=new Uint8Array(e),n="";for(let r=0;r<t.length;r++){let i=t[r];n+=dr[i>>>4&15],n+=dr[i&15]}return n}function pr(e){return e.replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())}function As(e,t){let{hostname:n,pathname:r}=e;if(n.endsWith(".on.aws")){let a=n.match(/^[^.]{1,63}\.lambda-url\.([^.]{1,63})\.on\.aws$/);return a!=null?["lambda",a[1]||""]:["",""]}if(n.endsWith(".r2.cloudflarestorage.com"))return["s3","auto"];if(n.endsWith(".backblazeb2.com")){let a=n.match(/^(?:[^.]{1,63}\.)?s3\.([^.]{1,63})\.backblazeb2\.com$/);return a!=null?["s3",a[1]||""]:["",""]}let i=n.replace("dualstack.","").match(/([^.]{1,63})\.(?:([^.]{0,63})\.)?amazonaws\.com(?:\.cn)?$/),o=i&&i[1]||"",s=i&&i[2];if(s==="us-gov")s="us-gov-west-1";else if(s==="s3"||s==="s3-accelerate")s="us-east-1",o="s3";else if(o==="iot")n.startsWith("iot.")?o="execute-api":n.startsWith("data.jobs.iot.")?o="iot-jobs-data":o=r==="/mqtt"?"iotdevicegateway":"iotdata";else if(o==="autoscaling"){let a=(t.get("X-Amz-Target")||"").split(".")[0];a==="AnyScaleFrontendService"?o="application-autoscaling":a==="AnyScaleScalingPlannerFrontendService"&&(o="autoscaling-plans")}else s==null&&o.startsWith("s3-")?(s=o.slice(3).replace(/^fips-|^external-1/,""),o="s3"):o.endsWith("-fips")?o=o.slice(0,-5):s&&/-\d$/.test(o)&&!/-\d$/.test(s)&&([o,s]=[s,o]);return[Os[o]||o,s||""]}var on="Event",gr=on+"Listener";function Is(e){return function(t,n,r,i){var o=r||no,s=i||!1;if(!Z)return o;var a=et(n),u=et(t,!0);if(!u.length)throw new Error("noElements");if(!a.length)throw new Error("no"+on);var c=[];return(function p(l){l&&(c=[]);for(var x=l?"add"+gr:"remove"+gr,y=0;y<u.length;y++){var b=u[y];c[y]=l?s&&s.once?Es(o):o:c[y]||o;for(var S=0;S<a.length;S++)b[x]?b["on"+a[S]]=l?c[y]:null:b[x](a[S],c[y],s)}return p.bind(null,!l)})(e)}}function et(e,t){if(le(e))return t?et(document.querySelectorAll(e)):(n=e).split(n.indexOf(",")>-1?",":" ").map(function(s){return s.trim()});var n;if(NodeList.prototype.isPrototypeOf(e)){for(var r=[],i=e.length>>>0;i--;)r[i]=e[i];return r}var o=yo(e);return t?o.map(function(s){return le(s)?et(s,!0):s}).flat():o}function Es(e,t){var n;return function(){return e&&(n=e.apply(this,arguments),e=null),n}}var bt=Is(on);function ci(e,t){return Z&&ee(window[e])?(n=window[e],r=t,(i=window)===void 0&&(i=null),ee(n)?function(){n.apply(i,arguments),r.apply(i,arguments)}:r):window[e]=t;var n,r,i}ci.bind(null,"onerror");ci.bind(null,"onload");var li=typeof window>"u",hr="hidden";function Ps(e){if(li)return!1;var t=js(),n="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),r=function(){return e(!!document[t])},i=function(){return document.addEventListener(n,r)};return i(),function(){return document.removeEventListener(n,r),i}}function js(){var e=["webkit","moz","ms","o"];return li||hr in document?hr:e.reduce(function(t,n){var r=n+"Hidden";return!t&&r in document?r:t},null)}var Ts=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ns(e,t){t===void 0&&(t={});var n=(function(s,a){var u=this,c=!1;return function(p){c||(s.call(u,p),c=!0,setTimeout(function(){return c=!1},a))}})(e,t.throttle||1e4),r=[];function i(){var s=Ps(function(a){a||n({type:"tabVisible"})});return r=[s].concat(Ts.map(function(a){return bt(document,a,n)})).concat(bt(window,"load",n)).concat(bt(window,"scroll",n,{capture:!0,passive:!0})),o}function o(){r.map(function(s){return s()})}return i(),function(){return o(),i}}function _s(e){var t,n,r=e.onIdle,i=e.onWakeUp,o=e.onHeartbeat,s=e.timeout,a=s,u=e.throttle,c=u,p=!1,l=!1,x=new Date,y=function(){return clearTimeout(t)};function b(h){y(),o&&!p&&o(Ce(x),h),i&&p&&(p=!1,i(Ce(n),h),x=new Date),t=setTimeout(function(){p=!0,r&&(n=new Date,r(Ce(x),h))},a)}var S=Ns(b,{throttle:c});return{disable:function(){l=!0,p=!1,y();var h=S();return function(){return l=!1,x=new Date,b({type:"load"}),h()}},getStatus:function(){return{isIdle:p,isDisabled:l,active:p?0:Ce(x,l),idle:p?Ce(n,l):0}}}}function Ce(e,t){return t?0:Math.round((new Date-e)/1e3)}var fi="object",Cs="string",mr="?",F="name",B="version",Ms="",yr="function",Us="undefined",Ds="BlackBerry",Rs="Chrome",zs="Firefox",vr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ls=[[/microsoft (windows) (vista|xp)/i],[F,B],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[F,[B,br,vr]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[F,"Windows"],[B,br,vr]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[F,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[F,"MacOS"],[B,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,F],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[F,B],[/\(bb(10);/i],[B,[F,Ds]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[F,zs+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[B,[F,"webOS"]],[/crkey\/([\d\.]+)/i],[B,[F,Rs+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[F,"Chromium OS"],B],[/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/(unix) ?([\w\.]*)/i],[F,B]];function $s(e,t){for(var n=0,r,i,o,s,a,u;n<t.length&&!a;){var c=t[n],p=t[n+1];for(r=i=0;r<c.length&&!a;)if(a=c[r++].exec(e),a)for(o=0;o<p.length;o++)u=a[++i],s=p[o],te(s)===fi&&s.length>0?s.length==2?te(s[1])==yr?this[s[0]]=s[1].call(this,u):this[s[0]]=s[1]:s.length==3?te(s[1])===yr&&!(s[1].exec&&s[1].test)?this[s[0]]=u?s[1].call(this,u,s[2]):void 0:this[s[0]]=u?u.replace(s[1],s[2]):void 0:s.length==4&&(this[s[0]]=u?s[3].call(this,u.replace(s[1],s[2])):void 0):this[s]=u||void 0;n+=2}}function br(e,t){for(var n in t)if(te(t[n])===fi&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(wr(t[n][r],e))return n===mr?void 0:n}else if(wr(t[n],e))return n===mr?void 0:n;return e}function wr(e,t){return te(e)===Cs?xr(t).indexOf(xr(e))!==-1:!1}function xr(e){return e.toLowerCase()}function Vs(e){var t=(typeof window>"u"?"undefined":te(window))!==Us&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:Ms,n={};return n[F]=void 0,n[B]=void 0,$s.call(n,t,Ls),n}var di="Brave";function sn(){if(typeof window>"u")return{};if(!window.navigator)return{};var e=window.navigator,t=e.platform,n=e.product,r=e.vendor,i=Hs(window.navigator),o=i.type,s=i.version,a=o===di?o:(r||"").split(" ")[0];return{platform:t,os:Vs(),make:a||n,model:o,version:s,name:[o,s].join("/"),language:Ws(),timezone:qs()}}function Ws(){var e=window.navigator,t=e.language,n=e.browserLanguage,r=e.languages;return(t||n||(r||["en_US"])[0]).toLowerCase().replace("-","_")}function qs(){var e=/\(([A-Za-z\s].*)\)/.exec(new Date().toString());return e&&e[1]||""}function Hs(e){var t=e.userAgent,n=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(t);if(n)return{type:n[1],version:n[2]};var r=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(t);if(r)return{type:r[1],version:r[2]};var i=/(headlesschrome)(?:\/([\w\.]+)| )/i.exec(t);if(i)return{type:i[1],version:i[2]};var o=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(t);if(o){var s=e.brave&&e.brave.isBrave||!1;return{type:s?di:o[1],version:o[2]}}var a=/.+(Safari)\/([0-9\.]+).*/i.exec(t);if(a)return{type:a[1],version:a[2]};var u=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(t);if(u)return{type:u[1],version:u[2]};var c=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(t),p=c||["","NA","0.0.0"];return{type:p[1],version:p[2]}}function Ks(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t[e]||e}function Mt(e){return Ut.apply(this,arguments)}function Ut(){return Ut=re(K.mark(function e(t){var n,r,i,o,s,a,u=arguments;return K.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:n=u.length>1&&u[1]!==void 0?u[1]:!1,r={},c.t0=K.keys(t);case 3:if((c.t1=c.t0()).done){c.next=13;break}return i=c.t1.value,o=Array.isArray(t[i])?t[i]:[t[i]],s=n?o:o[0],c.next=9,gi(s,Gs);case 9:a=c.sent,hi(a)||(r[i]=a),c.next=3;break;case 13:return c.abrupt("return",r);case 14:case"end":return c.stop()}},e)})),Ut.apply(this,arguments)}function pi(e){return Dt.apply(this,arguments)}function Dt(){return Dt=re(K.mark(function e(t){var n,r;return K.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:n={},i.t0=K.keys(t);case 2:if((i.t1=i.t0()).done){i.next=9;break}return r=i.t1.value,i.next=6,gi(t[r],Js);case 6:n[r]=i.sent,i.next=2;break;case 9:return i.abrupt("return",n);case 10:case"end":return i.stop()}},e)})),Dt.apply(this,arguments)}function gi(e,t){return Rt.apply(this,arguments)}function Rt(){return Rt=re(K.mark(function e(t,n){return K.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(typeof t!="function"){r.next=4;break}return r.next=3,t();case 3:t=r.sent;case 4:return r.abrupt("return",n(t));case 5:case"end":return r.stop()}},e)})),Rt.apply(this,arguments)}function Gs(e){if(e!=null)return Array.isArray(e)?e.filter(Xs).map(function(t){return t.toString()}):hi(e)?e:e.toString()}function Js(e){return parseFloat(Number(Array.isArray(e)?e[0]:e))}function Xs(e){return e!==null&&typeof e<"u"}function hi(e){return e==null}var zt="_session.start",ut="_session.stop",mi="pageView";function Fs(e){return Lt.apply(this,arguments)}function Lt(){return Lt=re(K.mark(function e(t){var n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A,k,C,M,P,z,U,q,$,E,H,D=arguments;return K.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(n=D.length>1&&D[1]!==void 0?D[1]:{},r=D.length>2&&D[2]!==void 0?D[2]:{},i=r.appTitle,o=r.appPackageName,s=r.appVersionCode,a=r.eventMapping,u=r.enrichEventAttributes,c=r.enrichEventMetrics,p=r.debug,l=p?console.log:function(){},x=Ks(t,a),y=Le(),b=n.sessionId||y.id,S=n.sessionStart||y.createdAt,h=n.sessionStart?new Date(n.sessionStart).getTime():y.created,l("event sessionData ",JSON.stringify(y)),be&&(f=rn(),m=ui(),l("event pageSessionInfo",JSON.stringify(f)),l("event tabSessionData ",JSON.stringify(m))),O=n.attributes||{},w=n.eventId||xe(),v=n.time?new Date(n.time):new Date,A=v.toISOString(),k=v.getTime()-h,C=J({date:A,sessionId:b},be?{pageSession:f.id}:{}),!u){N.next=23;break}return N.next=20,u();case 20:N.t0=N.sent,N.next=24;break;case 23:N.t0={};case 24:if(M=N.t0,P=J(J(J({},C),M),O),z=n.metrics||{},U={sessionTime:y.elapsed||k,hour:v.getHours(),day:v.getDay()+1,month:v.getMonth()+1,year:v.getFullYear()},!c){N.next=34;break}return N.next=31,c();case 31:N.t1=N.sent,N.next=35;break;case 34:N.t1={};case 35:return q=N.t1,$=J(J(J({},U),q),z),N.next=39,Mt(P);case 39:return N.t2=N.sent,N.next=42,pi($);case 42:return N.t3=N.sent,E={attributes:N.t2,metrics:N.t3},l("".concat(w,":").concat(x)),l("eventAttributes",E.attributes),l("eventMetrics",E.metrics),be&&l("clientInfo",sn()),H=tn({},w,J(J({EventType:x,Timestamp:A,AppPackageName:o,AppTitle:i},s?{AppVersionCode:s}:{}),{},{Attributes:E.attributes,Metrics:E.metrics,Session:{Id:b,StartTimestamp:S}})),t===ut&&(H[w].Session.Duration=k,H[w].Session.StopTimestamp=A),N.abrupt("return",H);case 51:case"end":return N.stop()}},e)})),Lt.apply(this,arguments)}var Bs="__endpoint";function ct(e){return"".concat(Bs,".").concat(e)}var Sr="__endpoint",Or=!1;function an(){return $t.apply(this,arguments)}function $t(){return $t=re(K.mark(function e(){var t,n,r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v,A=arguments;return K.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return t=A.length>0&&A[0]!==void 0?A[0]:{},n=A.length>1&&A[1]!==void 0?A[1]:{},r=n.getUserId,i=n.getEndpointId,o=n.endpointMigration,s=ra(n),a=s.sessionKey?s.sessionKey():"sessions",u=s.pageViewKey?s.pageViewKey():"pageViews",be&&(l=sn(),c=rn(),p=c.id),x=Le(),k.next=10,i();case 10:if(y=k.sent,Or||(Or=!0,b=Ft(Sr),b&&(wt(y,b),Qr(Sr))),S=Qs(y),h=ta(n),f=Ys(h,l),m={Attributes:{},Demographic:f,Location:{},Metrics:{}},be&&(l.device&&l.device.vendor&&(m.Attributes.DeviceMake=[l.device.vendor]),l.device&&l.device.model&&(m.Attributes.DeviceModel=[l.device.model]),l.device&&l.device.type&&(m.Attributes.DeviceType=[l.device.type])),t=Ss.all([S,m,t],{arrayMerge:na}),!(t.User&&t.User.UserId)){k.next=23;break}return k.next=21,r();case 21:O=k.sent,t.User.UserId!==O&&(t.User.UserId=O);case 23:if(!(!t.User||!t.User.UserId)){k.next=28;break}return k.next=26,r();case 26:w=k.sent,w&&(t.User=t.User||{},t.User.UserId=w);case 28:if(!(t.User&&t.User.UserAttributes)){k.next=32;break}return k.next=31,Mt(t.User.UserAttributes,!0);case 31:t.User.UserAttributes=k.sent;case 32:return k.next=34,Mt(t.Attributes,!0);case 34:return t.Attributes=k.sent,k.next=37,pi(t.Metrics);case 37:if(t.Metrics=k.sent,t.Metrics[a]||(t.Metrics[a]=1),t.Metrics[u]||(t.Metrics[u]=1),o&&(t=o(y,t)),v=t.Attributes.lastSession,v){k.next=47;break}return t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],p&&(t.Attributes.lastPageSession=[p]),k.abrupt("return",wt(y,t));case 47:return v&&v[0]!==x.id&&(t.Attributes.lastSessionDate=[x.createdAt],t.Attributes.lastSession=[x.id],t.Metrics[a]+=1),t.Attributes&&t.Attributes.lastPageSession&&Array.isArray(t.Attributes.lastPageSession)&&t.Attributes.lastPageSession.length>0&&t.Attributes.lastPageSession[0]!==p&&(t.Attributes.lastPageSession=[p],t.Metrics[u]+=1),k.abrupt("return",wt(y,t));case 50:case"end":return k.stop()}},e)})),$t.apply(this,arguments)}function wt(e,t){var n=ct(e),r=bs(t)?t:JSON.stringify(t);return Xo(n,r),t}function Qs(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function Ys(e,t){return be?ea(e,t):Zs(e)}function Zs(e){var t={AppVersion:e,Make:"generic server",Platform:"Node.js",PlatformVersion:process.version};return t}function ea(e,t){var n={AppVersion:e,Locale:t.language,Make:t.make,Model:t.model,ModelVersion:t.version,Platform:t.os.name||t.platform};return t.os&&t.os.version&&(n.PlatformVersion=t.os.version),n}function ta(e){var t=e.appTitle||e.appPackageName||"",n=e.appVersionCode||"0.0.0";return t?"".concat(t,"@").concat(n):n}function na(e,t){return t}function ra(e){var t=e.getContext;return typeof t=="function"?t():t}function ia(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function(){var n=re(K.mark(function i(o){var s,a,u,c,p=arguments;return K.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return s=p.length>1&&p[1]!==void 0?p[1]:{},a=p.length>2&&p[2]!==void 0?p[2]:{},u=p.length>3&&p[3]!==void 0?p[3]:!1,cr(s)&&(s={},u=s),cr(a)&&(a={},u=a),l.next=7,Fs(o,s,t);case 7:if(c=l.sent,!(Object.entries(a).length||o===mi)){l.next=12;break}return l.next=11,an(a,t);case 11:a=l.sent;case 12:if(e.push(c),!u){l.next=17;break}return l.abrupt("return",e.flush());case 17:case"end":return l.stop()}},i)}));function r(i){return n.apply(this,arguments)}return r})()}var kr,oa=[429,500],sa=[202],aa=400;function ua(e,t){return Vt.apply(this,arguments)}function Vt(){return Vt=re(K.mark(function e(t,n){var r,i,o,s,a,u,c,p,l,x,y,b,S,h,f,m,O,w,v;return K.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return r=n.pinpointRegion,i=n.pinpointAppId,o=n.lambdaArn,s=n.lambdaRegion,a=n.credentials,u=n.getCredentials,c=n.debug,A.next=3,ca(a,u);case 3:return p=A.sent,c&&console.log("pinpoint auth",p),l=s||r,x=r||s,y=n.fips===!0?"-fips":"",b="https://lambda.".concat(l,".amazonaws.com/2015-03-31/functions/").concat(o,"/invocations"),S="https://pinpoint".concat(y,".").concat(x,".amazonaws.com/v1/apps/").concat(i,"/events"),h=o?b:S,O={body:JSON.stringify(t)},f=new _t(p),A.next=16,f.fetch(h,O).then(function(k){return k.json()});case 16:m=A.sent,A.next=24;break;case 19:return f=new kr.PinpointClient({credentials:p,region:r}),w=new kr.PutEventsCommand({ApplicationId:i,EventsRequest:t}),A.next=23,f.send(w);case 23:m=A.sent;case 24:return m&&m.Results&&(v=Object.keys(m.Results).map(function(k){return m.Results[k]}),v.forEach(function(k){var C=k.EndpointItemResponse||{},M=k.EventsItemResponse||{};Object.keys(C).length&&(sa.includes(C.StatusCode)||oa.includes(C.StatusCode)||la(C,Endpoint));var P=Object.keys(M);P.length&&P.forEach(function(z){})})),A.abrupt("return",m);case 26:case"end":return A.stop()}},e)})),Vt.apply(this,arguments)}function ca(e,t){return Wt.apply(this,arguments)}function Wt(){return Wt=re(K.mark(function e(t,n){var r,i;return K.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r=t,!(!Object.keys(r).length&&n)){o.next=11;break}return o.prev=2,o.next=5,n();case 5:r=o.sent,o.next=11;break;case 8:throw o.prev=8,o.t0=o.catch(2),new Error(o.t0);case 11:return i={accessKeyId:r.accessKeyId||r.AccessKeyId,secretAccessKey:r.secretAccessKey||r.SecretKey,sessionToken:r.sessionToken||r.SessionToken,retries:5},o.abrupt("return",i);case 13:case"end":return o.stop()}},e,null,[[2,8]])})),Wt.apply(this,arguments)}function la(e,t){var n=e.StatusCode,r=e.Message;if(n===aa){if(r.startsWith("Missing ChannelType"))throw new Error("Missing ChannelType");if(r.startsWith("Exceeded maximum endpoint per user count"))throw new Error("Exceeded maximum endpoint per user count")}}var fa=["PUSH","GCM","APNS","APNS_SANDBOX","APNS_VOIP","APNS_VOIP_SANDBOX","ADM","SMS","VOICE","EMAIL","BAIDU","CUSTOM"],xt=fa.reduce(function(e,t){return e[t]=t,e},{}),da=sn(),Ar=zt,Ir=ut,pa=/.+\@.+\..+/;function ga(e){return pa.test(e)}function ha(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getEndpointId,n=e.debug;return(function(){var r=re(K.mark(function o(){var s,a,u,c,p,l,x,y,b,S,h=arguments;return K.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return s=h.length>0&&h[0]!==void 0?h[0]:[],a=h.length>1&&h[1]!==void 0?h[1]:{},f.next=4,t();case 4:if(u=f.sent,u){f.next=8;break}return console.error("No endpoint id. check getEndpointId()"),f.abrupt("return");case 8:if(c=te(a)==="object"&&Object.keys(a).length,c){f.next=13;break}f.t0=ma(u),f.next=16;break;case 13:return f.next=15,an(a,e);case 15:f.t0=f.sent;case 16:return p=f.t0,l=p.ChannelType,p.Address&&ga(p.Address)&&(l=xt.EMAIL),!l&&p.Address&&(da.platform==="android"?l=l||xt.GCM:l=l||xt.APNS),n&&(console.log("Endpoint",p),console.log("CHANNEL_TYPE",l)),p.RequestId=xe(),p.ChannelType=l,p.Address&&(p.OptOut=p.OptOut||"NONE"),x=ya(s),y=va(u,p,x),f.prev=26,f.next=29,ua(y,e);case 29:b=f.sent,f.next=36;break;case 32:f.prev=32,f.t1=f.catch(26),console.log("Error calling AWS",f.t1),S=f.t1;case 36:return f.abrupt("return",{endpoint:p,response:b,error:S,events:s});case 37:case"end":return f.stop()}},o,null,[[26,32]])}));function i(){return r.apply(this,arguments)}return i})()}function ma(e){try{return JSON.parse(Ft(ct(e)))||{}}catch{}return{}}function ya(e){return e.sort(function(t,n){var r=t.EventType,i=n.EventType;if(r==Ar)return-1;if(i==Ar||r==Ir)return 1;if(i==Ir)return-1}).reduce(function(t,n){return J(J({},n),t)},{})}function va(e,t,n){return{BatchItem:tn({},e,{Endpoint:t,Events:n})}}var ba=ut;function yi(){return{}}function wa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=J({getContext:e.getContext||yi,credentials:e.credentials||{},getEndpointId:e.getEndpointId},e),n=t.debug?console.log:function(){},r=ha(t),i=hs((function(){var u=re(K.mark(function c(p,l){var x;return K.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p.forEach(function(b){return n("> Queue event",b)}),y.next=3,r(p,{});case 3:x=y.sent,n("> Queue response",x);case 5:case"end":return y.stop()}},c)}));return function(c,p){return u.apply(this,arguments)}})(),{max:10,interval:e.flushInterval||3e3,throttle:!0}),o=ia(i,t);an({},e);var s=xa(o);function a(u){return r([],u)}return{updateEndpoint:a,recordEvent:o,disable:function(){s()}}}function xa(e){if(!be)return yi;var t=Sa(e);return window.addEventListener("beforeunload",t),function(){return window.removeEventListener("beforeunload",t)}}function Sa(e){return function(){e(ba,!0)}}function St(){throw new Error("Pinpoint not loaded")}function Oa(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return typeof r=="number"&&(t.metrics[n]=r),(typeof r=="string"||typeof r=="boolean")&&(t.attributes[n]=r),t},{attributes:{},metrics:{}})}function ka(e){var t=e.config,n=e.instance;t&&t.disableAnonymousTraffic&&!n.user("userId")&&n.once("identifyStart",function(r){var i=r.plugins,o=i["aws-pinpoint"];o.loaded()||n.loadPlugin("aws-pinpoint")})}var Aa={disableAnonymousTraffic:!1,pinpointRegion:"us-east-1",eventMapping:{}};function Ia(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t,n,r=!1;function i(){var s=Le();e.debug&&console.log("Stop session",s),t(ut,!0)}function o(){var s=Ze(30);e.debug&&console.log("START SESSION",s),t(zt)}return{name:"aws-pinpoint",config:J(J({},Aa),e),bootstrap:ka,initialize:function(s){var a=s.config,u=s.instance,c=a.disableAnonymousTraffic,p=a.debug,l=p?console.log:function(){},x=u.getState(),y=x.user||{},b=y.userId,S=y.anonymousId,h=x.context||{},f=h.app,m=h.version,O=h.campaign,w=rn(),v=ui(),A=Le();if(l("initPageSession",w),l("initTabSession",v),l("initSessionData",A),A&&A.anonId&&A.anonId!==S){l("anonId different refresh session details"),ur(),vs();var k=Ze(30,{anonId:S,userId:b});l("newSessionForNewUser",k)}if(!b&&c)return!1;var C=Object.keys(O).reduce(function(U,q){return U["utm_".concat(q)]=O[q],U},{}),M=wa(J(J({},a),{},{appTitle:a.appTitle||f,appPackageName:a.appPackageName||f,appVersionCode:a.appVersionCode||m,eventMapping:a.eventMapping,getEndpointId:function(){return u.user("anonymousId")},getUserId:function(){return u.user("userId")},getContext:function(){return{sessionKey:a.sessionKey,pageViewKey:a.pageViewKey,initialSession:A}},enrichEventAttributes:function(){return J({anonId:u.user("anonymousId"),userId:u.user("userId"),hash:window.location.hash,path:window.location.pathname,referrer:document.referrer,search:window.location.search,title:document.title,host:window.location.hostname,url:window.location.origin+window.location.pathname},C)},enrichUserAttributes:a.enrichUserAttributes,enrichEventMetrics:function(){return{}}}));t=M.recordEvent,n=M.updateEndpoint,A&&A.isNew&&(l("Start brand new session because cookie not found"),t(zt));var P=18e5,z=P;_s({timeout:z,throttle:2e4,onIdle:function(U,q){l("Session idle. Active ".concat(U," seconds")),i()},onWakeUp:function(U,q){l("Session wakeup. Idle ".concat(U," seconds")),o()},onHeartbeat:function(U,q){l("ping session",new Date),l("total active time",U);var $=u.user();ys(30,{anonId:$.anonymousId,userId:$.userId})}})},page:function(s){if(s.payload,s.config,!t)return St();r&&ur(),t(mi),r=!0},track:function(s){var a=s.payload,u=s.config;if(s.instance,!t)return St();if(!(u.disableAnonymousTraffic&&!a.userId)){var c=Oa(a.properties);t(a.event,c)}},identify:function(s){var a=s.payload,u=a.userId,c=a.traits;if(!n)return St();var p={},l={};u&&(l.UserId=u),c&&Object.keys(c).length&&(l.UserAttributes=c),Object.keys(l).length&&(p.User=l),n(p,!0)},reset:function(s){var a=s.instance,u=a.user("anonymousId"),c=ct(u);Qr(c)},loaded:function(){return!!t}}}var Ea=Ia;function vi(e){return Object.keys(e).some(t=>{let n=e[t];if(!n)return!1;switch(n&&n.toParam&&(n=n.toParam()),n.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function bi(e){let t={};return Object.keys(e).forEach(n=>{var r,i;let o=e[n];if(o&&o.toParam&&(o=o.toParam()),!o&&o!==0&&typeof o!="boolean"&&typeof o!="string")return;let s=o.constructor.name,a;switch(s){case"Array":let u=(i=(r=o[0])===null||r===void 0?void 0:r.constructor)===null||i===void 0?void 0:i.name;a=u==="Array"?o:u==="Object"?JSON.stringify(o):o.join(",");break;case"Object":a=JSON.stringify(o);break;case"Date":a=o.valueOf();break;case"Function":a=null;break;case"Boolean":a=o+"";break;default:a=o;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(t[n]=a)}),t}function wi(e,t){return Array.isArray(t)&&t[0]&&Array.isArray(t[0])?t.map(n=>wi(e,n)).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(t)}function xi(e){let t=bi(e);return Object.keys(t).map(n=>wi(n,t[n])).join("&")}var Pa=globalThis.FormData;function ja(e,t){let n=vi(e)||t,r=bi(e);if(n){let i=new Pa;return Object.keys(r).forEach(o=>{if(typeof Blob<"u"&&r[o]instanceof Blob){let s=r.fileName||r[o].name||o;i.append(o,r[o],s)}else i.append(o,r[o])}),i}else return xi(e)}var de=class extends Error{constructor(t,n,r,i,o){super(t);let s=new.target.prototype;Object.setPrototypeOf(this,s),t=t||"UNKNOWN_ERROR",n=n||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=n==="UNKNOWN_ERROR_CODE"?t:`${n}: ${t}`,this.originalMessage=t,this.code=n,this.response=r,this.url=i,this.options=o}},Ta={noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}},qt="ARCGIS_REST_JS_NO_CORS";globalThis[qt]||(globalThis[qt]=Object.assign({},Ta));var Y=globalThis[qt];function Na(e){let t=new URL(e);e=t.origin+t.pathname,t.search.includes("f=json")&&(e+="?f=json");let n=t.origin;return Y.pendingNoCorsRequests[n]||(Y.pendingNoCorsRequests[n]=fetch(e,{mode:"no-cors",credentials:"include",cache:"no-store"}).then(r=>{Y.noCorsDomains.indexOf(n)===-1&&Y.noCorsDomains.push(n),Y.crossOriginNoCorsDomains[n.toLowerCase()]=Date.now(),delete Y.pendingNoCorsRequests[n]}).catch(r=>(delete Y.pendingNoCorsRequests[n],Promise.reject(new Error(`no-cors request to ${n} failed`))))),Y.pendingNoCorsRequests[n]}function _a(e){e.forEach(t=>{t=t.toLowerCase(),/^https?:\/\//.test(t)?Ot(t):(Ot("http://"+t),Ot("https://"+t))})}function Ot(e){let t=new URL(e).origin;Y.noCorsDomains.indexOf(t)===-1&&Y.noCorsDomains.push(t)}function Si(e){let t=!1;if(Y.noCorsDomains.length){let n=new URL(e).origin.toLowerCase();t=Y.noCorsDomains.some(r=>n.includes(r))}return t}function Ca(e){let t=!1;if(Si(e)){let n=new URL(e).origin.toLowerCase(),r=Y.crossOriginNoCorsDomains[n]||0;Date.now()-60*6e4>r&&(t=!0)}return t}function Ma(e){console&&console.warn&&console.warn.apply(console,[e])}function Ua(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}function Da(e,t){var n;if(!t&&!window||!e)return!1;{t=t||window;let r=(n=t.location)===null||n===void 0?void 0:n.origin;return e.startsWith(r)}}var Ra="@esri/arcgis-rest-js";function za(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var tt=class extends de{constructor(t="AUTHENTICATION_ERROR",n="AUTHENTICATION_ERROR_CODE",r,i,o){super(t,n,r,i,o),this.name="ArcGISAuthError",this.message=n==="AUTHENTICATION_ERROR_CODE"?t:`${n}: ${t}`;let s=new.target.prototype;Object.setPrototypeOf(this,s)}retry(t,n=1){let r=0,i=(o,s)=>{r=r+1,t(this.url,this.options).then(a=>{let u=Object.assign(Object.assign({},this.options),{authentication:a});return Oi(this.url,u)}).then(a=>{o(a)}).catch(a=>{a.name==="ArcGISAuthError"&&r<n?i(o,s):a.name===this.name&&a.message===this.message&&r>=n?s(this):s(a)})};return new Promise((o,s)=>{i(o,s)})}};function La(e,t,n,r,i){if(e.code>=400){let{message:o,code:s}=e;throw new de(o,s,e,t,r)}if(e.error){let{message:o,code:s,messageCode:a}=e.error,u=a||s||"UNKNOWN_ERROR_CODE";throw s===498||s===499?i||new tt(o,u,e,t,r):new de(o,u,e,t,r)}if(e.status==="failed"||e.status==="failure"){let o,s="UNKNOWN_ERROR_CODE";try{o=JSON.parse(e.statusMessage).message,s=JSON.parse(e.statusMessage).code}catch{o=e.statusMessage||e.message}throw new de(o,s,e,t,r)}return e}function Oi(e,t){let n=za(),r=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},n),t),{params:Object.assign(Object.assign({},n.params),t.params),headers:Object.assign(Object.assign({},n.headers),t.headers)}),{httpMethod:i,rawResponse:o}=r,s=Object.assign({f:"json"},r.params),a=null,u={method:i,signal:r.signal,credentials:r.credentials||"same-origin"};Si(e)&&(u.credentials="include"),r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let c;if(typeof r.authentication=="string"){let b=r.authentication;c={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(b)},!r.authentication.startsWith("AAPK")&&!r.authentication.startsWith("AAPT")&&!r.authentication.startsWith("AATK")&&!r.authentication.startsWith("AAST")&&!r.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(Ma("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else c=r.authentication;let p=e,l=!1;typeof window<"u"&&(l=Da(e));let x=!l&&Ca(e);r.headers&&r.headers["X-Esri-Auth-Client-Id"]&&e.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let y=Promise.resolve();return x&&(u.credentials="include",y=Na(e)),y.then(()=>c?c.getToken(e).catch(b=>(b.url=e,b.options=r,a=b,Promise.resolve(""))):Promise.resolve("")).then(b=>{b.length&&(s.token=b),c&&c.getDomainCredentials&&(u.credentials=c.getDomainCredentials(e));let S={};if(u.method==="GET"){s.token&&r.hideToken&&typeof window>"u"&&(S["X-Esri-Authorization"]=`Bearer ${s.token}`,delete s.token);let f=xi(s),m=f===""?e:`${e}?${f}`;r.maxUrlLength&&m.length>r.maxUrlLength||!r.maxUrlLength&&m.length>2e3||s.token&&r.hideToken?(u.method="POST",b.length&&r.hideToken&&(s.token=b,delete S["X-Esri-Authorization"])):e=m}let h=new RegExp("/items/.+/updateResources").test(e);return u.method==="POST"&&(u.body=ja(s,h)),u.headers=Object.assign(Object.assign({},S),r.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=Ra),!vi(s)&&!h&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(e,u):Ua().then(({fetch:f})=>f(e,u))}).then(b=>{if(!b.ok)return b.json().then(S=>{let{status:h,statusText:f}=b,{message:m,details:O}=S.error,w=`${m}. ${O?O.join(" "):""}`.trim();throw new de(w,`HTTP ${h} ${f}`,S,e,r)}).catch(S=>{if(S.name==="ArcGISRequestError")throw S;let{status:h,statusText:f}=b;throw new de(f,`HTTP ${h}`,b,e,r)});if(o)return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."),b;switch(s.f){case"json":return b.json();case"geojson":return b.json();case"html":return b.text();case"text":return b.text();default:return b.blob()}}).then(b=>{if((s.f==="json"||s.f==="geojson")&&!o){let S=La(b,p,s,r,a);if(b&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(e)&&Array.isArray(b.authorizedCrossOriginNoCorsDomains)&&_a(b.authorizedCrossOriginNoCorsDomains),a){let h=e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];r.authentication.federatedServers[h]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return S}else return b})}function ki(e,t={params:{f:"json"}}){let{request:n}=t,r=Gt(t,["request"]);return n?n(e,r):Oi(e,r).catch(i=>i instanceof tt&&t.authentication&&typeof t.authentication!="string"&&t.authentication.canRefresh&&t.authentication.refreshCredentials?i.retry(()=>t.authentication.refreshCredentials(),1):Promise.reject(i))}function $a(e){return typeof e!="string"||(e=e.trim(),e[e.length-1]==="/"&&(e=e.slice(0,-1))),e}function Re(e={}){return e.portal?$a(e.portal):e.authentication&&typeof e.authentication!="string"?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function Va(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function Wa(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])}function qa(e){return e.join(",")}function Ai(e,t,n){if(!e)return e;let r=null;return typeof e.thumbnail=="string"&&(r=`${t}/content/items/${e.id}/info/${e.thumbnail}`,r&&e.access!=="public"&&n&&(r+=`?${n}`)),Object.assign(Object.assign({},e),r?{thumbnailUrl:r}:{})}function Ha(e){return Va(e).then(t=>{let n=e.folderId?`${Re(e)}/content/users/${t}/${e.folderId}/items/${e.item.id}/update`:`${Re(e)}/content/users/${t}/items/${e.item.id}/update`;e.params=Object.assign(Object.assign({},e.params),e.item),e.params.extent&&Wa(e.params.extent)&&(e.params.extent=qa(e.params.extent));let r=Re(e),i=Ai(Object.assign(Object.assign({},e.item),{access:e.item.access}),r),o=e.params.thumbnailUrl;return typeof i.thumbnailUrl=="string"&&typeof o=="string"&&i.thumbnailUrl.split("?")[0]===o.split("?")[0]&&delete e.params.thumbnailUrl,ki(n,e)})}function Ii(e,t){let n=Ka(e,t),r=Object.assign({httpMethod:"GET"},t);return ki(n,r).then(async i=>{let o=t?.portal||Re(t),s;return t?.authentication&&typeof t.authentication!="string"&&i.access!=="public"&&(s=await t.authentication.getToken(n)),Ai(i,o,s)})}var Ka=(e,t)=>`${typeof t=="string"?t:Re(t)}/content/items/${e}`;function Ga(e,t,n){return n.reduce((r,i)=>{let{action:o,targetProperty:s}=i;return o==="add"?r[s]={updatedAt:new Date,updatedBy:e}:o==="remove"&&delete r[s],r},t)}async function Ja({id:e,authentication:t,username:n,accessChangeset:r}){let{properties:i={}}=await Ii(e,{authentication:t}),o=i.telemetry,s=o===void 0?{}:o,{arcgis:{access:a={}}={}}=s,u=Gt(s,["arcgis"]),c=Ga(n,a,r);return Ha({item:{id:e,properties:Object.assign(Object.assign({},i),{telemetry:Object.assign(Object.assign({},u),{arcgis:{access:Object.assign({},c)}})})},authentication:t})}async function Xa({id:e,authentication:t}){let{properties:{telemetry:{arcgis:{access:n={}}={}}={}}}=await Ii(e,{authentication:t});return{access:n}}var Ht=class{constructor(t){this.name="amazon",this.isInitialized=!1;let{app:n={},fips:r,userPoolID:i}=t;this.analytics=os({app:n.name,version:n.version,plugins:[Ea({fips:r,pinpointAppId:n.id,getCredentials:()=>Wi(i,{fips:r})})]}),Object.assign(this,t)}init(){if(!this.isInitialized)return this.isInitialized=!0,Promise.resolve()}static async setAccessPermissions({id:t,authentication:n,username:r,accessChangeset:i}){return Ja({id:t,authentication:n,username:r,accessChangeset:i})}static async getAccessPermissions({id:t,authentication:n}){return Xa({id:t,authentication:n})}logPageView(t,n){let r=Xi({page:t,previousPage:this.previousPage,options:n,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{pageUrl:i,pageName:o}=r;this.previousPage={pageUrl:i,pageName:o},this.analytics.track("pageView",r)}logEvent(t={}){let n=Ji({event:t,dimensionLookup:this.dimensions,metricLookup:this.metrics}),{name:r}=n;this.analytics.track(r,n)}},Fa=cn`:host{display:block}`,Kt=class extends fn{constructor(){super(...arguments),this.amazonAppId="",this.amazonAppName="",this.amazonUserPoolID="",this.amazonVersion="",this.firstUseVar="",this.measurementIds=[],this._open=!1,this._translations=pn({name:"consent-manager",blocking:!0}),this._loaded=!1,this.consentGranted=ln()}static{this.properties={amazonAppId:1,amazonAppName:1,amazonUserPoolID:1,amazonVersion:1,firstUseVar:1,measurementIds:0,portal:0,_open:16,_translations:16}}static{this.styles=Fa}async getInstance(){if(localStorage.getItem(this.firstUseVar)==="true"||this.portal?.eueiEnabled)return await this._init(),this._telemetryInstance}async load(){this._open=localStorage.getItem(this.firstUseVar)===null}render(){return""}loaded(){this.consentGranted.emit({granted:localStorage.getItem(this.firstUseVar)==="true"})}async _init(){if(!this._loaded){let t={info:console.info?console.info.bind(console):console.log.bind(console),error:console.error?console.error.bind(console):console.log.bind(console),warn:(r,...i)=>{(!r.includes("non-primitive value")||!r.includes("userSince"))&&(console.warn||console.log)(r,...i)}},n={plugins:[],portal:this.portal,logger:t};if(this.measurementIds?.length>0){let r=new At({measurementIds:this.measurementIds});n.plugins.push(r)}if(this.amazonUserPoolID){let r=new Ht({userPoolID:this.amazonUserPoolID,app:{name:this.amazonAppName,id:this.amazonAppId,version:this.amazonVersion}});n.plugins.push(r)}this._telemetryInstance=new kt(n),await this._telemetryInstance.init(),this._loaded=!0}}_alertClosed(){this._open=!1,localStorage.getItem(this.firstUseVar)!=="true"&&localStorage.setItem(this.firstUseVar,"false")}_accept(){localStorage.setItem(this.firstUseVar,"true"),this.consentGranted.emit({granted:!0}),this._open=!1}};dn("consent-manager",Kt);export{Kt as ConsentManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import e from"./6CJGNF3Y.js";import c from"./RTSKNY33.js";import{b as w}from"./PZ4L77M5.js";import{Cb as P,Db as O,K as v,M as $,N as T,c as E,q as _,sa as A}from"./JE7L7M3J.js";import{a as R}from"./LFIJXE3U.js";import{k as L}from"./2IHQU2FX.js";import{b as C}from"./VU3OQQKP.js";import{F as d,G as h,H as S,J as u,K as D,L as b,h as M,i as a,r as y}from"./46DQNAMV.js";export default $arcgis.t(([{F:p,G:x,K:g,a:U,b:N,c:F,r:H,s:f,t:V,v:B,x:z,y:Y,z:k},{a:G}])=>{var K=M`.display-flex{display:flex}.flex-direction-row{flex-direction:row}.flex-direction-column{flex-direction:column}.flex-1{flex:1}.cursor-default{cursor:default}solution-details-card[id*=you-may-also-like]{width:240px}.border-bottom{border-bottom-color:var(--calcite-color-border-1);border-bottom-width:var(--calcite-spacing-px);border-bottom-style:solid}ul{list-style-type:disc;margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}ul ul{list-style-type:circle}li{margin:var(--calcite-spacing-sm) var(--calcite-spacing-none)}calcite-label{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.padding-1{padding:var(--calcite-spacing-lg)}.padding-1-5{padding:var(--calcite-spacing-xl)}.padding-2px{padding:var(--calcite-spacing-base)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-bottom-1{padding-bottom:var(--calcite-spacing-lg)}.padding-bottom-sm{padding-bottom:var(--calcite-spacing-sm)}.padding-top-md{padding-top:var(--calcite-spacing-md)}.padding-top-sm{padding-top:var(--calcite-spacing-sm)}.padding-top-xs{padding-top:.25rem}.padding-bottom-1-5{padding-bottom:var(--calcite-spacing-xxl)}.padding-top-1{padding-top:var(--calcite-spacing-lg)}.padding-top-1-5{padding-top:var(--calcite-spacing-xxl)}.padding-top-1-2{padding-top:var(--calcite-spacing-sm)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-1-75{padding-inline-end:1.75rem}.padding-end-2{padding-inline-end:var(--calcite-spacing-xxxl)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.margin-bottom-1{margin-bottom:var(--calcite-spacing-lg)}.margin-bottom-1-5{margin-bottom:var(--calcite-spacing-xxl)}.margin-end-1{margin-inline-end:var(--calcite-spacing-lg)}.margin-top-0{margin-top:var(--calcite-spacing-none)}.margin-top-1{margin-top:var(--calcite-spacing-lg)}.margin-top-875{margin-top:.875rem}.margin-top-1-5{margin-top:var(--calcite-spacing-xxl)}.margin-sides-0-5{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm)}.margin-sides-1{margin-left:var(--calcite-spacing-lg);margin-right:var(--calcite-spacing-lg)}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.align-self-center{align-self:center;padding:5px;--calcite-fab-shadow: #FFFFFF00}.align-items-center{align-items:center}.align-items-baseline{align-items:baseline}.button-width{width:260px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.button-width{width:auto}}.image-width{width:300px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.image-width{flex-grow:0;flex-shrink:1}}.width-full{width:100%}@media(max-width:768px){.width-full{flex-direction:column}.width-full>.display-flex{flex-direction:column}.image-width{width:100%;padding-inline-end:0;margin-bottom:var(--calcite-spacing-lg)}.button-width{width:100%;margin-top:var(--calcite-spacing-lg)}}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-sm) var(--calcite-spacing-md)}#screenshots-subsection calcite-card{width:calc(33.333% - .5rem)}calcite-card{width:450px;--calcite-card-border-color: transparent}@media(max-width:1496px){calcite-card{width:calc(100% / 3 - .5rem)}#screenshots-subsection calcite-card{width:calc(33.333% - .5rem)}}@media(max-width:1100px){calcite-card{width:calc(50% - .5rem)}#screenshots-subsection calcite-card{width:calc(50% - .5rem)}}@media(max-width:550px){calcite-card{width:100%}#screenshots-subsection calcite-card{width:100%}}.max-height-300{max-height:300px}.display-none{display:none}.cursor-pointer{cursor:pointer}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{border:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer;padding:var(--calcite-spacing-base)}calcite-card.is-mobile:hover img{cursor:default;-webkit-filter:brightness(100%);filter:brightness(100%);transition:all .1s ease}calcite-card{border:var(--calcite-spacing-base) solid transparent;box-sizing:border-box;padding:var(--calcite-spacing-base)}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}#screenshots-subsection .card-image{background-color:var(--calcite-color-surface-2)}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip;display:block}.margin-inline-unset{margin-inline:unset}.collapsible-div{overflow:hidden;transition:max-height .3s ease-in-out}.collapsible-div.expanded{max-height:100%}.back-color-override{--calcite-panel-background-color: var(--calcite-color-foreground-2)}.back-color-override-1{background-color:var(--calcite-color-foreground-1)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.line-height-xxl{line-height:var(--calcite-spacing-xxl)}.line-height-1{line-height:1.1}.font-1{font-size:var(--calcite-spacing-lg)}.font-color-1{color:var(--calcite-color-text-1)}.font-color-2{color:var(--calcite-color-text-2)}h1{font-weight:unset;margin:var(--calcite-spacing-none);padding:var(--calcite-spacing-none)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.accordion-bg{--calcite-accordion-background-color: var(--calcite-color-foreground-1)}.table-cell{font-size:var(--calcite-spacing-lg);color:var(--calcite-color-text-2);margin:0}.table-cell p{margin:0}calcite-table-header{font-weight:var(--calcite-font-weight-medium);--calcite-internal-table-cell-font-size: var(--calcite-font-size-md)}.position-relative{position:relative}.background-color-2{background-color:var(--calcite-color-foreground-2)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-foreground-2);background-color:var(--calcite-color-foreground-2)}.border-none{border:none}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}calcite-shell{block-size:unset}.solution-detail-action{--calcite-color-focus: initial}a{color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:hover{background-size:100% 1px,100% 1px}a:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:active{color:var(--calcite-color-brand-press)}*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}`;async function q(n,e,t){let i=t;return n&&(n?.IsEnterprisePortal&&await Z("",e)&&i.push(p.NOTEBOOK),await F(e)?t.push(p.VELOCITY):n?.PortalUserPrivileges&&[x.VELOCITYFEEDS,x.VELOCITYBIGDATA,x.VELOCITYREALTIME].forEach(s=>{let o=t.indexOf(s)||-1;o!==-1&&t.splice(o,1)}),i=i.concat(j(Q(n),ee(n))),i=i.concat(J(n)),i=i.concat(await X(n))),Promise.resolve(i)}function j(n,e){let t=[];return n&&e?t=[p.TRACKINGADMINANDTRACKING,p.TRACKINGADMIN,p.TRACKING]:n&&!e?t=[p.TRACKINGADMIN]:!n&&e&&(t=[p.TRACKING]),t}function J(n){return te(n)?[p.HUBPREMIUM]:[]}async function X(n){let e=n?.RestUserSession;if(!e?.username)return[];let t=await O(e);return await P(t,e)?[p.WORKFLOW]:[]}async function Z(n,e){let t=n+"/sharing/rest",i={authentication:e,portal:t,params:{f:"json"}};return E(`${t}/portals/self/servers`,i).then(s=>s?.servers?.find(o=>o.serverFunction.indexOf("NotebookServer")>-1),s=>(console.error(s),!1))}function Q(n){let e=n?.PortalUserSubset?.privileges;return e?["portal:admin:create","portal:admin:delete","portal:admin:update","portal:admin:reassign"].every(i=>e.some(s=>s.startsWith(i))):!1}function ee(n){return n?.PortalSubset?.locationTrackingEnabled||!1}function te(n){return n?.PortalSubset?.hubPremiumEnabled||!1}var I=class extends S{constructor(){super(),this._isDeployDisabled=!1,this._isLoaded=!1,this._showScreenshotsShowMore=!1,this._showYouMayAlsoLikeShowMore=!1,this.isMobile=!1,this._isScreenshotsRowExpanded=!1,this._isYouMayAlsoLikeRowExpanded=!1,this._screenshotsRowBaseHeight=340,this._showLoader=!1,this._templates=[],this._translations=R({name:"solution-details-panel",blocking:!0}),this._youMayAlsoLikeBaseHeight=340,this._allCards=[],this._configContextConsumer=w({context:N,subscribe:!0}),this._configureLearnMore="",this._customDeploymentMappings={},this._deployDialogRef=d(),this._deployingDialogRef=d(),this._isMobileContextConsumer=w({context:U,subscribe:!0,callback:e=>this.isMobile=e}),this._overviewAccordionItemElement=d(),this._privilegePopoverRef=d(),this._privileges=[],this._regexFsUrl="https?:\\/\\/.+FeatureServer\\b",this._regexID="\\b[0-9A-F]{32}\\b",this._releaseNotesAccordionItemElement=d(),this._relatedResourcesAccordionItemElement=d(),this._screenshotsAccordionItemElement=d(),this._screenshotsDialogRef=d(),this._screenshotsElement=d(),this._termsOfUseAccordionItemElement=d(),this._userOptions=[],this._youMayAlsoLikeAccordionItemElement=d(),this._youMayAlsoLikeElement=d(),this._signInParamValue=null,this._deploymentStartTime=null,this._cancellationStartTime=null,this._deployToCancelDuration=0,this.templatesFetched=y(),this.itemPropertiesFetched=y(),this.sortTypeChanged=y(),this.tokenRefreshed=y(),this._handleDeployCancelled=()=>{this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Deploy Dialog Canceled",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]})},this._handleDeploySuccess=()=>{let e=f(this._deploymentStartTime);this._deploymentStartTime=null,this._deployingDialogRef.value&&(this._deployingDialogRef.value.isWaitingForCard=!0),this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Deploy Success",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""],metrics:[e]})},this._handleDeployedCardReady=async e=>{this._closeDialogs(),await new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(t))),window.dispatchEvent(new CustomEvent("displayDeployedCard",{detail:e.detail}))},this._handleDeploymentFallback=()=>{console.warn("Deployment completed but unable to navigate to deployed card - closing dialogs"),this._closeDialogs(),window.dispatchEvent(new CustomEvent("navTabSelected",{detail:"deployments"}))},this._handleDeploymentProcessCancelled=()=>{this._cancellationStartTime=Date.now(),this._deployToCancelDuration=f(this._deploymentStartTime),this._deploymentStartTime=null},this._handleDeployFailed=e=>{if(this._cancellationStartTime!==null){this._closeDialogs();return}let t=f(this._deploymentStartTime);this._deploymentStartTime=null;let i=H(e.detail?.error),s=i.length>200?i.slice(-200):i;console.error("Deployment failed:",e.detail?.error),this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Deploy Failure",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",s],metrics:[t]}),this._closeDialogs(!0)},this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"allCardsFetched",this._allCardsFetched),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"deployedCardReady",this._handleDeployedCardReady),this.listenOn(window,"deploymentCompletedWithoutNav",this._handleDeploymentFallback)}static{this.properties={card:0,_isDeployDisabled:16,_isLoaded:16,_showScreenshotsShowMore:16,_showYouMayAlsoLikeShowMore:16,isMobile:16,_isScreenshotsRowExpanded:16,_isYouMayAlsoLikeRowExpanded:16,_itemProperties:16,_missingPrivilegeMessages:16,_screenshotsRowBaseHeight:16,_showLoader:16,_templates:16,_translations:16,_youMayAlsoLikeBaseHeight:16}}static{this.styles=K}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async connectedCallback(){super.connectedCallback(),this.listenOn(window,"calciteTabChange",this._cleanupPanel)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}willUpdate(e){e.has("card")&&(this._isDeployDisabled=!1,this._isLoaded=!1,this._showLoader=!1,this._signInParamValue==="deploy"&&(this._showLoader=!0))}loaded(){this._signInParamValue===null&&this._configContextConsumer.value?.authentication?.SignInParam&&(this._signInParamValue=this._configContextConsumer.value.authentication.SignInParam),this._resizeObserver=new ResizeObserver(async()=>{this._onResize()}),this._screenshotsElement.value&&this._resizeObserver.observe(this._screenshotsElement.value)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect()}render(){let e="padding-bottom-1-5",t=this._getRelatedResources(),i=this._getYouMayAlsoLikeCards();return a`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="margin-top-875 padding-1-5 back-color-override-1 margin-bottom-1-5" id=solution-details-row>${this._getSolutionRow()}</div><div class=${u(e)}>${this._getScreenshotsRow()}</div><div class=${u(e)}>${this._getOverviewRow()}</div><div class=${u(e)}>${this._getReleaseNotesRow()}</div>${t.length>0?a`<div class=${u(e)}>${this._getRelatedResourcesRow(t)}</div>`:""}${i.length>0?a`<div class=${u(e)}>${this._getYouMayAlsoLikeRow(i)}</div>`:""}<div class=${u(e)}>${this._getTermsOfUseRow()}</div>${this.isMobile?"":a`<solution-deploy-dialog .card=${this.card} @deployCancelled=${this._handleDeployCancelled} @deployFailed=${this._handleDeployFailed} @deployProgressEnd=${this._handleDeploySuccess} @deployProgressStart=${this._deployProgressStart} @deployProgressUpdated=${this._deployProgessUpdated} id=solutionDeployDialog .userOptions=${this._userOptions} ${h(this._deployDialogRef)}></solution-deploy-dialog>`}<solution-snapshot-gallery .card=${this.card} id=solutionSnapshotGallery .itemProperties=${this._itemProperties} ${h(this._screenshotsDialogRef)}></solution-snapshot-gallery><solution-deploying-dialog .card=${this.card} @deploymentProcessCancelled=${this._handleDeploymentProcessCancelled} ${h(this._deployingDialogRef)}></solution-deploying-dialog></calcite-panel></calcite-shell>`}updated(){setTimeout(()=>{let e=this._getYouMayAlsoLikeCards(),t=340;for(let i=0;i<e.length;i++){let s=this.el.shadowRoot?.getElementById(`you-may-also-like-${i}`),o=s?.offsetHeight?s.offsetHeight+40:0;o>t&&(t=o)}this._youMayAlsoLikeBaseHeight=t,this._showYouMayAlsoLikeShowMore=(this._youMayAlsoLikeElement.value?.scrollHeight||0)>this._youMayAlsoLikeBaseHeight,this._showScreenshotsShowMore=(this._screenshotsElement.value?.scrollHeight||0)>this._screenshotsRowBaseHeight+2},100)}_checkUrlParametersForAutoDeployment(){if(this._signInParamValue==="deploy"){let e=this._missingPrivilegeMessages&&(this._missingPrivilegeMessages.leadingMessages.length>0||this._missingPrivilegeMessages.bulletedMessages.length>0||this._missingPrivilegeMessages.trailingMessages.length>0);this._configContextConsumer.value?.authentication?.IsSignedIn&&this.card&&this._deployDialogRef.value&&!e&&(this._signInParamValue=null,this._openDeploy())}}_getSolutionRow(){let e=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400"),t=this._missingPrivilegeMessages?.leadingMessages||[],i=t.length>0,s=this._missingPrivilegeMessages?.bulletedMessages||[],o=s.length>0,l=this._missingPrivilegeMessages?.trailingMessages||[],c=l.length>0;return a`<div class="display-flex flex-direction-row width-full"><div class="padding-end-1-75 image-width"><img alt=${this.card?.title??b} src=${e??b}></div><div class="display-flex flex-direction-row flex-1">${this._getTextSection(i,o,c,t,s,l)}${this._getButtons()}</div></div>`}_getTextSection(e,t,i,s,o,l){return a`<div class="display-flex flex-direction-column padding-end-1 flex-1"><div class="display-flex flex-direction-row align-items-baseline"><h1 class="padding-top-xs title-font margin-top-0 margin-bottom-1-5 line-height-1" tabindex=0>${this.card?.title}</h1>${this.card?.categories?.some(c=>c.includes("New Release"))&&a`<calcite-chip class="margin-bottom-1-5 margin-sides-1" kind=brand .label=${this._translations.newChip} scale=m icon=star>${this._translations.newChip}</calcite-chip>`||""}</div><div class="font-1 padding-end-1 line-height-xxl" tabindex=0>${this.card?.snippet}</div>${this.isMobile?"":e||t||i?a`<div class="display-flex flex-direction-row padding-top-1">${this._getMissingPrivilegesNotice(s,o,l)}</div>`:""}</div>`}_getButtons(){let e=this._itemProperties?.demoURL||"";return a`<div class="display-flex flex-direction-column button-width">${!this.isMobile&&a`<calcite-button class="padding-bottom-1 solution-detail-action" .disabled=${this._isDeployDisabled} icon-flip-rtl=end @click=${()=>this._checkPermissionsBeforeDeploy()} scale=m>${this._showLoader?a`<calcite-loader inline label></calcite-loader>`:this._translations.deployButton}</calcite-button>`||""}${!this._configContextConsumer.value?.isEnterprise&&e&&a`<calcite-button appearance=outline-fill kind=neutral class="padding-bottom-1 solution-detail-action" @click=${()=>this._handleWatchDemoClick(e)} scale=m>${this._translations.watchDemo}</calcite-button>`||""}<calcite-button appearance=outline-fill kind=neutral class="padding-bottom-1 solution-detail-action" @click=${()=>this._handleLearnMoreClick()} scale=m>${this._translations.openHelp}</calcite-button>${!this._configContextConsumer.value?.isEnterprise&&a`<solution-social-share button-appearance=outline-fill class="padding-bottom-1" share-button-kind=neutral .shareButtonText=${this._translations.share} share-button-scale=m .solutionId=${this.card?.deployCommonId||""} .solutionTitle=${this.card?.title||""} .solutionVersion=${this.card?.deployVersion||""}></solution-social-share>`||""}</div>`}_getMissingPrivilegesNotice(e,t,i){let s="solutions-missing-privileges-notice",o=this._translations.missingPrivilegesPopup.missingLicensingOrPrivileges,l=t.length>0?"":"display-none",c=t.length>0?"padding-top-sm":"";return a`<div><calcite-notice class="margin-inline-unset" kind=info open><div slot=message>${`${o}`}</div><calcite-action icon=information id=${s} slot=actions-end .text=${o}></calcite-action></calcite-notice><calcite-popover closable label overlay-positioning=fixed placement=bottom reference-element=solutions-missing-privileges-notice ${h(this._privilegePopoverRef)}><div class="padding-1 display-flex flex-direction-column">${this._getSpanMessages(e,"padding-bottom-1")}<span class=${`padding-bottom-1-2 ${l}`}>${this._translations.missingPrivilegesPopup.missingPrivilegesListHeading}</span>${this._getBulletedMessages(t)}${this._getSpanMessages(i,c)}</div></calcite-popover></div>`}_getSpanMessages(e,t){return e.length>0?e.map(i=>a`<span class=${u(t)}>${i}</span>`):""}_getBulletedMessages(e){return e.length>0?a`<ul>${e.map(t=>a`<li>${t}</li>`)}</ul>`:""}_getScreenshotsRow(){let e=this._isScreenshotsRowExpanded?this._translations.showLess:this._translations.showMore,t=this._isScreenshotsRowExpanded?"arrow-up":"arrow-down",i=this._showScreenshotsShowMore?"":"display-none";return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._screenshotsAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.solutionOverview}</div><calcite-panel><div class="display-flex flex-direction-column back-color-override-1"><div class="collapsible-div max-height-300" id=screenshots-subsection ${h(this._screenshotsElement)}>${this._getScreenshots()}</div><calcite-fab appearance=outline-fill class=${`align-self-center ${i}`} .icon=${t} kind=neutral @click=${()=>{this._screenshotsElement.value?.classList.toggle("expanded"),this._isScreenshotsRowExpanded=this._screenshotsElement.value.classList.contains("expanded")}} .text=${e} text-enabled></calcite-fab></div></calcite-panel></calcite-accordion-item></calcite-accordion>`}_getScreenshots(){let e=this._itemProperties?.preview.filter(i=>i.format==="image")||[],t=this._configContextConsumer.value;return a`<calcite-card-group class="card-group" .label=${this._translations.solutionOverview}>${e.reduce((i,s)=>{let o=k(this.card?.id||"",s.name,t.authentication),l;return t.agoBasedEnterpriseSolutionsGroupId&&t.isEnterprise&&(l=k(this.card?.id||"",s.name,void 0,t.agolPortalUrl)),this.card?.id?i.push(a`<calcite-card class=${`${this.isMobile?"is-mobile":"cursor-pointer not-mobile"}`} .label=${s.alt} @click=${()=>this._openScreenshotGallery(s)} @keydown=${c=>V(c,()=>this._openScreenshotGallery(s))}><div class="card-image-wrap" slot=thumbnail><img alt=${s.alt??b} class="thumbnail card-image" slot=thumbnail src=${(l||o)??b}>${!this.isMobile&&a`<div class="hover-text">${this._translations.openInGallery}</div>`||""}</div></calcite-card>`):i.push(""),i},[])}</calcite-card-group>`}_openScreenshotGallery(e){if(!this.isMobile){this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Screenshot Gallery",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]});let t=this._screenshotsDialogRef.value;t&&(t.screenshot=e,t.open=!0)}}_getOverviewRow(){return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._overviewAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.solutionDetails}</div>${this._getDescriptionRow()}${this._getInformationProductsRow()}</calcite-accordion-item></calcite-accordion>`}_getDescriptionRow(){return a`<div class="display-flex flex-direction-column"><div class="font-color-2 font-1 margin-top-0 line-height-xxl padding-bottom-xxl" tabindex=0>${this.card?.snippet}</div><div class="font-color-2 font-1 margin-top-0 line-height-xxl padding-bottom-xxl" .innerHTML=${this.card?.description??""} tabindex=0></div></div>`}_getInformationProductsRow(){return a`<div class="display-flex flex-direction-column font-1 line-height-xxl font-color-2"><span tabindex=0>${this.card?.title?this._translations.informationProductsSubText.replace("{{solutionTitle}}",this.card.title):""}</span><calcite-table bordered caption class="padding-top-1">${this._getInformationTableHeaderRow()}${this._getInformationTableRows()}</calcite-table><p tabindex=0>${this._translations.informationProductsFooterText}</p></div>`}_getInformationTableHeaderRow(){return a`<calcite-table-row slot=table-header><calcite-table-header .heading=${this._translations.solutionItem}></calcite-table-header><calcite-table-header .heading=${this._translations.description}></calcite-table-header><calcite-table-header .heading=${this._translations.minimumUserType}></calcite-table-header></calcite-table-row>`}_getInformationTableRows(){return(this._itemProperties?.infoProducts||[]).map(e=>a`<calcite-table-row><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.item)??""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.description)??""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.userType)??""}></p></calcite-table-cell></calcite-table-row>`)}_getReleaseNotesRow(){return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._releaseNotesAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.releaseNotes}</div><div class="display-flex flex-direction-column"><calcite-table bordered caption>${this._getReleaseNotesTableHeaderRow()}${this._getReleaseNotesTableRows()}</calcite-table></div></calcite-accordion-item></calcite-accordion>`}_getReleaseNotesTableHeaderRow(){return a`<calcite-table-row slot=table-header><calcite-table-header .heading=${this._translations.version}></calcite-table-header><calcite-table-header .heading=${this._translations.description}></calcite-table-header></calcite-table-row>`}_getReleaseNotesTableRows(){return(this._itemProperties?.releaseNotes||[])?.map(e=>a`<calcite-table-row><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.version)??""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.description)??""}></p></calcite-table-cell></calcite-table-row>`)}_getRelatedResourcesRow(e){return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._relatedResourcesAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.relatedResources}</div><div class="display-flex flex-direction-row">${e.map(()=>{a`<solution-resource-card></solution-resource-card>`})}</div></calcite-accordion-item></calcite-accordion>`}_getRelatedResources(){return[]}_getYouMayAlsoLikeRow(e){let t=this._showYouMayAlsoLikeShowMore?"":"display-none",i=this._isYouMayAlsoLikeRowExpanded?this._translations.showLess:this._translations.showMore,s=this._isYouMayAlsoLikeRowExpanded?"arrow-up":"arrow-down",o=this._isYouMayAlsoLikeRowExpanded?"":{height:`${this._youMayAlsoLikeBaseHeight}px`};return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._youMayAlsoLikeAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.youMayAlsoLike}</div><div class="display-flex flex-direction-column"><div class="collapsible-div" id=you-may-also-like-subsection style=${D(o)} ${h(this._youMayAlsoLikeElement)}><div class="display-flex flex-direction-row"><calcite-card-group class="card-group" .label=${this._translations.youMayAlsoLike}>${e.map((l,c)=>a`<solution-details-card .id=${`you-may-also-like-${c}`} .card=${l} class="padding-2px" source=you-may-also-like .referrerSolutionId=${this.card?.deployCommonId||""} .referrerSolutionTitle=${this.card?.title||""} .referrerSolutionVersion=${this.card?.deployVersion||""}></solution-details-card>`)}</calcite-card-group></div></div><calcite-fab appearance=outline-fill class=${`align-self-center ${t}`} .icon=${s} kind=inverse @click=${()=>{this._youMayAlsoLikeElement.value?.classList.toggle("expanded"),this._isYouMayAlsoLikeRowExpanded=this._youMayAlsoLikeElement.value.classList.contains("expanded")}} .text=${i} text-enabled></calcite-fab></div></calcite-accordion-item></calcite-accordion>`}_getYouMayAlsoLikeCards(){let e=this._itemProperties?.relatedSolutions||[];return this._allCards.filter(t=>e.indexOf(t.deployCommonId)>-1)}_getTermsOfUseRow(){return a`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._termsOfUseAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.termsOfUse}</div><div class="font-color-2" .innerHTML=${(this.card?.licenseInfo||"")??""} tabindex=0></div></calcite-accordion-item></calcite-accordion>`}_openDeploy(){if(this._configContextConsumer.value.authentication.IsSignedIn){let e=this._deployDialogRef.value;e&&(this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Deploy Dialog Opened",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),e.userOptions=this._userOptions,e.open=!0)}else this._configContextConsumer.value.authentication.signIn("deploy")}_openUrl(e){window.open(e,"_blank")}_handleWatchDemoClick(e){this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Watch Demo",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),this._openUrl(e)}_handleLearnMoreClick(){this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),this._openUrl(this.card?.learnMoreUrl||"")}async _detailsCardSelected(e){this.card=e.detail,this.el.scrollIntoView(!0),this._onResize(),this._missingPrivilegeMessages=void 0,await this._getItemData(),this._expandAccordions()}_expandAccordions(){this._overviewAccordionItemElement.value&&(this._overviewAccordionItemElement.value.expanded=!0),this._releaseNotesAccordionItemElement.value&&(this._releaseNotesAccordionItemElement.value.expanded=!0),this._relatedResourcesAccordionItemElement.value&&(this._relatedResourcesAccordionItemElement.value.expanded=!0),this._screenshotsAccordionItemElement.value&&(this._screenshotsAccordionItemElement.value.expanded=!0),this._termsOfUseAccordionItemElement.value&&(this._termsOfUseAccordionItemElement.value.expanded=!0),this._youMayAlsoLikeAccordionItemElement.value&&(this._youMayAlsoLikeAccordionItemElement.value.expanded=!0)}async _getItemData(){let e=this._configContextConsumer.value,t=e?.agoBasedEnterpriseSolutionsGroupId&&e?.isEnterprise?e.anonAgolSession:e?.userSession,i=await A(this.card.id,t),s=await L(this.card.id,t);this._itemProperties=s.properties,this.itemPropertiesFetched.emit(this._itemProperties);let o=B(i,this.card.typeKeywords,e?.authentication);this._privileges=t.username?o:[],this._userPrivileges=e?.authentication&&e?.userSession?await q(e.authentication,e.userSession,e.authentication.PortalUserPrivileges):[];let l=this._privileges.filter(m=>!this._userPrivileges.includes(m));this._missingPrivilegeMessages=z(this._translations,l),this._isDeployDisabled=this._missingPrivilegeMessages&&(this._missingPrivilegeMessages.leadingMessages.length>0||this._missingPrivilegeMessages.bulletedMessages.length>0||this._missingPrivilegeMessages.trailingMessages.length>0);let c=i.params?await this.formatParams(i.params):[];this._userOptions=c,this._templates=i.templates,this.templatesFetched.emit(i.templates),this._checkUrlParametersForAutoDeployment(),this._isLoaded=!0,this._showLoader&&(this._showLoader=!1,this._isDeployDisabled||this._openDeploy())}formatParams(e){let t=this._configContextConsumer.value.userSession,i=[],s=e?Object.keys(e):[],o={id:"",props:[],accordionDisplay:!1};if(s.length>0){let l=[];return s.forEach(c=>{let m=e[c];m.valueType&&m.valueType.toLowerCase()==="itemid"&&l.push(this._findExistingItem(c,"Feature Service",t.username||""))}),Promise.all(l).then(c=>{let m={};return c.forEach(r=>{if(r.query&&r.results&&r.results.length>0){let W=r.query.split(" ")[0].replace("typekeywords:source-","");m[W]={resultId:r.results[0].id,response:r.results[0]}}}),s.forEach(r=>{if(r==="serviceLearnMore"){this._configureLearnMore=e[r],alert(this._configureLearnMore),delete e[r];return}e[r].enterpriseIDMapping&&(this._customDeploymentMappings[r]=e[r].enterpriseIDMapping),o.id=r,m[r]&&(e[r].existingItemId=m[r].resultId,this.updateUserProp(e[r],m[r].response)),this.updateOption(e[r],o,r)}),i.push(o),Promise.resolve(i)}).catch(()=>Promise.resolve([]))}else return Promise.resolve([])}_findExistingItem(e,t,i){let s=this._configContextConsumer.value.userSession;return G(`typekeywords:source-${e} type:${t} owner:${i}`,s)}updateUserProp(e,t){let i=e.itemType?.toLowerCase()==="feature service",s=new RegExp(i?this._regexFsUrl:e.itemType,"iu"),o=$(t,i?"url":"type","")||"",l=o!==""&&s.test(o);return e.responseValue=l?o:"",e.name=l&&v(t,"name")||"",e.title=l&&v(t,"title")||"",e.itemType=l?v(t,"type"):e.itemType,e.validId=l,e.itemUrl=Y(t.id,this._configContextConsumer.value.authentication),l}updateOption(e,t,i){let s=e.default||"",o=typeof s,l=s.toString();this._setFeatureServiceProps(e);let c=this.getValidation(e,l);t.props.push({id:i,outType:o,prop:i,itemType:e.itemType||"",responseValue:e.responseValue||"",label:e.label||"",choices:e.choices||[],valueType:e.valueType.toLowerCase(),attributes:e.attributes||{},value:e.existingItemId&&e.valueType.toLowerCase()==="itemid"?e.existingItemId:l,default:l,srSearchText:l,autoSelect:l!=="",...c,loading:!1,validId:!0,tooltip:e.tooltip||"",name:e.name||"",title:e.title||"",itemUrl:e.itemUrl||""})}_setFeatureServiceProps(e){e.valueType&&e.valueType.toLowerCase()==="itemid"&&T(e,"attributes.required","true")}getValidation(e,t){let i="",s=v(e,"validation.message")||"",o=!0;return v(e,"attributes.required")==="true"&&(i=$(e,"validation.expression","\\S{1,}"),o=new RegExp(i).test(t)),e.valueType&&e.valueType.toLowerCase()==="itemid"&&(i=this._regexID,s=this._translations.configure.invalidID),{valid:o,validation:{expression:i,message:s}}}_allCardsFetched(e){this._allCards=e.detail}_onResize(){this._showYouMayAlsoLikeShowMore=(this._youMayAlsoLikeElement.value?.scrollHeight||0)>this._youMayAlsoLikeBaseHeight,this._showScreenshotsShowMore=(this._screenshotsElement.value?.scrollHeight||0)>this._screenshotsRowBaseHeight+2}_cleanupPanel(){this.el.scrollIntoView(!0),this._isScreenshotsRowExpanded=!1,this._showScreenshotsShowMore=!1,this._screenshotsElement.value?.classList.remove("expanded"),this._isYouMayAlsoLikeRowExpanded=!1,this._showYouMayAlsoLikeShowMore=!1,this._youMayAlsoLikeElement.value?.classList.remove("expanded"),this._privilegePopoverRef.value?.open&&(this._privilegePopoverRef.value.open=!1),this._isDeployDisabled=!1,this._isLoaded=!1,this._showLoader=!1,this._expandAccordions()}_deployProgressStart(e){this._deploymentStartTime=Date.now(),this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Deploy Started",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),this._deployingDialogRef.value&&(this._deployingDialogRef.value.open=!0,this._deployingDialogRef.value.abortController=e.detail),this._deployDialogRef.value&&this._deployDialogRef.value.classList.add("display-none")}_deployProgessUpdated(e){let t=e.detail;this._deployingDialogRef.value.deploymentProgress=t.progress}_closeDialogs(e=!1){if(this._cancellationStartTime!==null){let t=f(this._cancellationStartTime);this._telemetry?.logEvent({category:g.SOLUTION_DETAILS,action:"Deploy Canceled",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""],metrics:[this._deployToCancelDuration,t]}),this._cancellationStartTime=null,this._deployToCancelDuration=0}this._deployingDialogRef.value.close(),e?this._deployDialogRef.value.open=!0:this._deployDialogRef.value.close(),this._deployDialogRef.value.classList.remove("display-none")}_handleDeployAppTabSelected(e){e.detail==="details"&&this.sortTypeChanged.emit("")}_checkPermissionsBeforeDeploy(){this._isLoaded?this._openDeploy():this._configContextConsumer.value.authentication?.IsSignedIn?this._showLoader=!0:this._openDeploy()}};C("solution-details-panel",I);return I},c,e)
|
|
2
|
+
import c from"./KKI72ISR.js";import a from"./RTSKNY33.js";import{b as w}from"./PZ4L77M5.js";import{Cb as P,Db as O,K as v,M as $,N as T,c as E,q as _,sa as A}from"./JE7L7M3J.js";import{a as L}from"./LFIJXE3U.js";import{k as R}from"./2IHQU2FX.js";import{b as C}from"./VU3OQQKP.js";import{F as d,G as h,H as S,J as u,K as D,L as b,h as M,i as o,r as y}from"./46DQNAMV.js";export default $arcgis.t(([{F:g,G:x,K:m,a:U,b:N,c:F,r:H,s:f,t:V,v:B,x:z,y:Y,z:k},{a:G}])=>{var K=M`.display-flex{display:flex}.flex-direction-row{flex-direction:row}.flex-direction-column{flex-direction:column}.flex-1{flex:1}.cursor-default{cursor:default}solution-details-card[id*=you-may-also-like]{width:240px}.border-bottom{border-bottom-color:var(--calcite-color-border-1);border-bottom-width:var(--calcite-spacing-px);border-bottom-style:solid}ul{list-style-type:disc;margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}ul ul{list-style-type:circle}li{margin:var(--calcite-spacing-sm) var(--calcite-spacing-none)}calcite-label{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.padding-1{padding:var(--calcite-spacing-lg)}.padding-1-5{padding:var(--calcite-spacing-xl)}.padding-2px{padding:var(--calcite-spacing-base)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-bottom-1{padding-bottom:var(--calcite-spacing-lg)}.padding-bottom-sm{padding-bottom:var(--calcite-spacing-sm)}.padding-top-md{padding-top:var(--calcite-spacing-md)}.padding-top-sm{padding-top:var(--calcite-spacing-sm)}.padding-top-xs{padding-top:.25rem}.padding-bottom-1-5{padding-bottom:var(--calcite-spacing-xxl)}.padding-top-1{padding-top:var(--calcite-spacing-lg)}.padding-top-1-5{padding-top:var(--calcite-spacing-xxl)}.padding-top-1-2{padding-top:var(--calcite-spacing-sm)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-1-75{padding-inline-end:1.75rem}.padding-end-2{padding-inline-end:var(--calcite-spacing-xxxl)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.margin-bottom-1{margin-bottom:var(--calcite-spacing-lg)}.margin-bottom-1-5{margin-bottom:var(--calcite-spacing-xxl)}.margin-end-1{margin-inline-end:var(--calcite-spacing-lg)}.margin-top-0{margin-top:var(--calcite-spacing-none)}.margin-top-1{margin-top:var(--calcite-spacing-lg)}.margin-top-875{margin-top:.875rem}.margin-top-1-5{margin-top:var(--calcite-spacing-xxl)}.margin-sides-0-5{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm)}.margin-sides-1{margin-left:var(--calcite-spacing-lg);margin-right:var(--calcite-spacing-lg)}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.align-self-center{align-self:center;padding:5px;--calcite-fab-shadow: #FFFFFF00}.align-items-center{align-items:center}.align-items-baseline{align-items:baseline}.button-width{width:260px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.button-width{width:auto}}.image-width{width:300px;flex-grow:0;flex-shrink:0}@media(max-width:1280px){.image-width{flex-grow:0;flex-shrink:1}}.width-full{width:100%}@media(max-width:768px){.width-full{flex-direction:column}.width-full>.display-flex{flex-direction:column}.image-width{width:100%;padding-inline-end:0;margin-bottom:var(--calcite-spacing-lg)}.button-width{width:100%;margin-top:var(--calcite-spacing-lg)}}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-sm) var(--calcite-spacing-md)}#screenshots-subsection calcite-card{width:calc(33.333% - .5rem)}calcite-card{width:450px;--calcite-card-border-color: transparent}@media(max-width:1496px){calcite-card{width:calc(100% / 3 - .5rem)}#screenshots-subsection calcite-card{width:calc(33.333% - .5rem)}}@media(max-width:1100px){calcite-card{width:calc(50% - .5rem)}#screenshots-subsection calcite-card{width:calc(50% - .5rem)}}@media(max-width:550px){calcite-card{width:100%}#screenshots-subsection calcite-card{width:100%}}.max-height-300{max-height:300px}.display-none{display:none}.cursor-pointer{cursor:pointer}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{border:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer;padding:var(--calcite-spacing-base)}calcite-card.is-mobile:hover img{cursor:default;-webkit-filter:brightness(100%);filter:brightness(100%);transition:all .1s ease}calcite-card{border:var(--calcite-spacing-base) solid transparent;box-sizing:border-box;padding:var(--calcite-spacing-base)}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}#screenshots-subsection .card-image{background-color:var(--calcite-color-surface-2)}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip;display:block}.margin-inline-unset{margin-inline:unset}.collapsible-div{overflow:hidden;transition:max-height .3s ease-in-out}.collapsible-div.expanded{max-height:100%}.back-color-override{--calcite-panel-background-color: var(--calcite-color-foreground-2)}.back-color-override-1{background-color:var(--calcite-color-foreground-1)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.line-height-xxl{line-height:var(--calcite-spacing-xxl)}.line-height-1{line-height:1.1}.font-1{font-size:var(--calcite-spacing-lg)}.font-color-1{color:var(--calcite-color-text-1)}.font-color-2{color:var(--calcite-color-text-2)}h1{font-weight:unset;margin:var(--calcite-spacing-none);padding:var(--calcite-spacing-none)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.accordion-bg{--calcite-accordion-background-color: var(--calcite-color-foreground-1)}.table-cell{font-size:var(--calcite-spacing-lg);color:var(--calcite-color-text-2);margin:0}.table-cell p{margin:0}calcite-table-header{font-weight:var(--calcite-font-weight-medium);--calcite-internal-table-cell-font-size: var(--calcite-font-size-md)}.position-relative{position:relative}.background-color-2{background-color:var(--calcite-color-foreground-2)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-foreground-2);background-color:var(--calcite-color-foreground-2)}.border-none{border:none}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}calcite-shell{block-size:unset}.solution-detail-action{--calcite-color-focus: initial}a{color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:hover{background-size:100% 1px,100% 1px}a:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:active{color:var(--calcite-color-brand-press)}*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}`;async function q(n,e,t){let i=t;return n&&(n?.IsEnterprisePortal&&await Z("",e)&&i.push(g.NOTEBOOK),await F(e)?t.push(g.VELOCITY):n?.PortalUserPrivileges&&[x.VELOCITYFEEDS,x.VELOCITYBIGDATA,x.VELOCITYREALTIME].forEach(s=>{let a=t.indexOf(s)||-1;a!==-1&&t.splice(a,1)}),i=i.concat(j(Q(n),ee(n))),i=i.concat(J(n)),i=i.concat(await X(n))),Promise.resolve(i)}function j(n,e){let t=[];return n&&e?t=[g.TRACKINGADMINANDTRACKING,g.TRACKINGADMIN,g.TRACKING]:n&&!e?t=[g.TRACKINGADMIN]:!n&&e&&(t=[g.TRACKING]),t}function J(n){return te(n)?[g.HUBPREMIUM]:[]}async function X(n){let e=n?.RestUserSession;if(!e?.username)return[];let t=await O(e);return await P(t,e)?[g.WORKFLOW]:[]}async function Z(n,e){let t=n+"/sharing/rest",i={authentication:e,portal:t,params:{f:"json"}};return E(`${t}/portals/self/servers`,i).then(s=>s?.servers?.find(a=>a.serverFunction.indexOf("NotebookServer")>-1),s=>(console.error(s),!1))}function Q(n){let e=n?.PortalUserSubset?.privileges;return e?["portal:admin:create","portal:admin:delete","portal:admin:update","portal:admin:reassign"].every(i=>e.some(s=>s.startsWith(i))):!1}function ee(n){return n?.PortalSubset?.locationTrackingEnabled||!1}function te(n){return n?.PortalSubset?.hubPremiumEnabled||!1}var I=class extends S{constructor(){super(),this._isDeployDisabled=!1,this._isLoaded=!1,this._showScreenshotsShowMore=!1,this._showYouMayAlsoLikeShowMore=!1,this.isMobile=!1,this._isScreenshotsRowExpanded=!1,this._isYouMayAlsoLikeRowExpanded=!1,this._screenshotsRowBaseHeight=340,this._showLoader=!1,this._templates=[],this._translations=L({name:"solution-details-panel",blocking:!0}),this._youMayAlsoLikeBaseHeight=340,this._allCards=[],this._configContextConsumer=w({context:N,subscribe:!0}),this._configureLearnMore="",this._customDeploymentMappings={},this._deployDialogRef=d(),this._deployingDialogRef=d(),this._isMobileContextConsumer=w({context:U,subscribe:!0,callback:e=>this.isMobile=e}),this._overviewAccordionItemElement=d(),this._privilegePopoverRef=d(),this._privileges=[],this._regexFsUrl="https?:\\/\\/.+FeatureServer\\b",this._regexID="\\b[0-9A-F]{32}\\b",this._releaseNotesAccordionItemElement=d(),this._relatedResourcesAccordionItemElement=d(),this._screenshotsAccordionItemElement=d(),this._screenshotsDialogRef=d(),this._screenshotsElement=d(),this._termsOfUseAccordionItemElement=d(),this._userOptions=[],this._youMayAlsoLikeAccordionItemElement=d(),this._youMayAlsoLikeElement=d(),this._signInParamValue=null,this._deploymentStartTime=null,this._cancellationStartTime=null,this._deployToCancelDuration=0,this.templatesFetched=y(),this.itemPropertiesFetched=y(),this.sortTypeChanged=y(),this.tokenRefreshed=y(),this._handleDeployCancelled=()=>{this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Deploy Dialog Canceled",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]})},this._handleDeploySuccess=()=>{let e=f(this._deploymentStartTime);this._deploymentStartTime=null,this._deployingDialogRef.value&&(this._deployingDialogRef.value.isWaitingForCard=!0),this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Deploy Success",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""],metrics:[e]})},this._handleDeployedCardReady=async e=>{this._closeDialogs(),await new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(t))),window.dispatchEvent(new CustomEvent("displayDeployedCard",{detail:e.detail}))},this._handleDeploymentFallback=()=>{console.warn("Deployment completed but unable to navigate to deployed card - closing dialogs"),this._closeDialogs(),window.dispatchEvent(new CustomEvent("navTabSelected",{detail:"deployments"}))},this._handleDeploymentProcessCancelled=()=>{this._cancellationStartTime=Date.now(),this._deployToCancelDuration=f(this._deploymentStartTime),this._deploymentStartTime=null},this._handleDeployFailed=e=>{if(this._cancellationStartTime!==null){this._closeDialogs();return}let t=f(this._deploymentStartTime);this._deploymentStartTime=null;let i=H(e.detail?.error),s=i.length>200?i.slice(-200):i;console.error("Deployment failed:",e.detail?.error),this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Deploy Failure",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",s],metrics:[t]}),this._closeDialogs(!0)},this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"allCardsFetched",this._allCardsFetched),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"deployedCardReady",this._handleDeployedCardReady),this.listenOn(window,"deploymentCompletedWithoutNav",this._handleDeploymentFallback)}static{this.properties={card:0,_isDeployDisabled:16,_isLoaded:16,_showScreenshotsShowMore:16,_showYouMayAlsoLikeShowMore:16,isMobile:16,_isScreenshotsRowExpanded:16,_isYouMayAlsoLikeRowExpanded:16,_itemProperties:16,_missingPrivilegeMessages:16,_screenshotsRowBaseHeight:16,_showLoader:16,_templates:16,_translations:16,_youMayAlsoLikeBaseHeight:16}}static{this.styles=K}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async connectedCallback(){super.connectedCallback(),this.listenOn(window,"calciteTabChange",this._cleanupPanel)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}willUpdate(e){e.has("card")&&(this._isDeployDisabled=!1,this._isLoaded=!1,this._showLoader=!1,this._signInParamValue==="deploy"&&(this._showLoader=!0))}loaded(){this._signInParamValue===null&&this._configContextConsumer.value?.authentication?.SignInParam&&(this._signInParamValue=this._configContextConsumer.value.authentication.SignInParam),this._resizeObserver=new ResizeObserver(async()=>{this._onResize()}),this._screenshotsElement.value&&this._resizeObserver.observe(this._screenshotsElement.value)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver?.disconnect()}render(){let e="padding-bottom-1-5",t=this._getRelatedResources(),i=this._getYouMayAlsoLikeCards();return o`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="margin-top-875 padding-1-5 back-color-override-1 margin-bottom-1-5" id=solution-details-row>${this._getSolutionRow()}</div><div class=${u(e)}>${this._getScreenshotsRow()}</div><div class=${u(e)}>${this._getOverviewRow()}</div><div class=${u(e)}>${this._getReleaseNotesRow()}</div>${t.length>0?o`<div class=${u(e)}>${this._getRelatedResourcesRow(t)}</div>`:""}${i.length>0?o`<div class=${u(e)}>${this._getYouMayAlsoLikeRow(i)}</div>`:""}<div class=${u(e)}>${this._getTermsOfUseRow()}</div>${this.isMobile?"":o`<solution-deploy-dialog .card=${this.card} @deployCancelled=${this._handleDeployCancelled} @deployFailed=${this._handleDeployFailed} @deployProgressEnd=${this._handleDeploySuccess} @deployProgressStart=${this._deployProgressStart} @deployProgressUpdated=${this._deployProgessUpdated} id=solutionDeployDialog .userOptions=${this._userOptions} ${h(this._deployDialogRef)}></solution-deploy-dialog>`}<solution-snapshot-gallery .card=${this.card} id=solutionSnapshotGallery .itemProperties=${this._itemProperties} ${h(this._screenshotsDialogRef)}></solution-snapshot-gallery><solution-deploying-dialog .card=${this.card} @deploymentProcessCancelled=${this._handleDeploymentProcessCancelled} ${h(this._deployingDialogRef)}></solution-deploying-dialog></calcite-panel></calcite-shell>`}updated(){setTimeout(()=>{let e=this._getYouMayAlsoLikeCards(),t=340;for(let i=0;i<e.length;i++){let s=this.el.shadowRoot?.getElementById(`you-may-also-like-${i}`),a=s?.offsetHeight?s.offsetHeight+40:0;a>t&&(t=a)}this._youMayAlsoLikeBaseHeight=t,this._showYouMayAlsoLikeShowMore=(this._youMayAlsoLikeElement.value?.scrollHeight||0)>this._youMayAlsoLikeBaseHeight,this._showScreenshotsShowMore=(this._screenshotsElement.value?.scrollHeight||0)>this._screenshotsRowBaseHeight+2},100)}_checkUrlParametersForAutoDeployment(){if(this._signInParamValue==="deploy"){let e=this._missingPrivilegeMessages&&(this._missingPrivilegeMessages.leadingMessages.length>0||this._missingPrivilegeMessages.bulletedMessages.length>0||this._missingPrivilegeMessages.trailingMessages.length>0);this._configContextConsumer.value?.authentication?.IsSignedIn&&this.card&&this._deployDialogRef.value&&!e&&(this._signInParamValue=null,this._openDeploy())}}_getSolutionRow(){let e=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400"),t=this._missingPrivilegeMessages?.leadingMessages||[],i=t.length>0,s=this._missingPrivilegeMessages?.bulletedMessages||[],a=s.length>0,l=this._missingPrivilegeMessages?.trailingMessages||[],c=l.length>0;return o`<div class="display-flex flex-direction-row width-full"><div class="padding-end-1-75 image-width"><img alt=${this.card?.title??b} src=${e??b}></div><div class="display-flex flex-direction-row flex-1">${this._getTextSection(i,a,c,t,s,l)}${this._getButtons()}</div></div>`}_getTextSection(e,t,i,s,a,l){return o`<div class="display-flex flex-direction-column padding-end-1 flex-1"><div class="display-flex flex-direction-row align-items-baseline"><h1 class="padding-top-xs title-font margin-top-0 margin-bottom-1-5 line-height-1" tabindex=0>${this.card?.title}</h1>${this.card?.categories?.some(c=>c.includes("New Release"))&&o`<calcite-chip class="margin-bottom-1-5 margin-sides-1" kind=brand .label=${this._translations.newChip} scale=m icon=star>${this._translations.newChip}</calcite-chip>`||""}</div><div class="font-1 padding-end-1 line-height-xxl" tabindex=0>${this.card?.snippet}</div>${this.isMobile?"":e||t||i?o`<div class="display-flex flex-direction-row padding-top-1">${this._getMissingPrivilegesNotice(s,a,l)}</div>`:""}</div>`}_getButtons(){let e=this._itemProperties?.demoURL||"";return o`<div class="display-flex flex-direction-column button-width">${!this.isMobile&&o`<calcite-button class="padding-bottom-1 solution-detail-action" .disabled=${this._isDeployDisabled} icon-flip-rtl=end @click=${()=>this._checkPermissionsBeforeDeploy()} scale=m>${this._showLoader?o`<calcite-loader inline label></calcite-loader>`:this._translations.deployButton}</calcite-button>`||""}${!this._configContextConsumer.value?.isEnterprise&&e&&o`<calcite-button appearance=outline-fill kind=neutral class="padding-bottom-1 solution-detail-action" @click=${()=>this._handleWatchDemoClick(e)} scale=m>${this._translations.watchDemo}</calcite-button>`||""}<calcite-button appearance=outline-fill kind=neutral class="padding-bottom-1 solution-detail-action" @click=${()=>this._handleLearnMoreClick()} scale=m>${this._translations.openHelp}</calcite-button>${!this._configContextConsumer.value?.isEnterprise&&o`<solution-social-share button-appearance=outline-fill class="padding-bottom-1" share-button-kind=neutral .shareButtonText=${this._translations.share} share-button-scale=m .solutionId=${this.card?.deployCommonId||""} .solutionTitle=${this.card?.title||""} .solutionVersion=${this.card?.deployVersion||""}></solution-social-share>`||""}</div>`}_getMissingPrivilegesNotice(e,t,i){let s="solutions-missing-privileges-notice",a=this._translations.missingPrivilegesPopup.missingLicensingOrPrivileges,l=t.length>0?"":"display-none",c=t.length>0?"padding-top-sm":"";return o`<div><calcite-notice class="margin-inline-unset" kind=info open><div slot=message>${`${a}`}</div><calcite-action icon=information id=${s} slot=actions-end .text=${a}></calcite-action></calcite-notice><calcite-popover closable label overlay-positioning=fixed placement=bottom reference-element=solutions-missing-privileges-notice ${h(this._privilegePopoverRef)}><div class="padding-1 display-flex flex-direction-column">${this._getSpanMessages(e,"padding-bottom-1")}<span class=${`padding-bottom-1-2 ${l}`}>${this._translations.missingPrivilegesPopup.missingPrivilegesListHeading}</span>${this._getBulletedMessages(t)}${this._getSpanMessages(i,c)}</div></calcite-popover></div>`}_getSpanMessages(e,t){return e.length>0?e.map(i=>o`<span class=${u(t)}>${i}</span>`):""}_getBulletedMessages(e){return e.length>0?o`<ul>${e.map(t=>o`<li>${t}</li>`)}</ul>`:""}_getScreenshotsRow(){let e=this._isScreenshotsRowExpanded?this._translations.showLess:this._translations.showMore,t=this._isScreenshotsRowExpanded?"arrow-up":"arrow-down",i=this._showScreenshotsShowMore?"":"display-none";return o`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._screenshotsAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.solutionOverview}</div><calcite-panel><div class="display-flex flex-direction-column back-color-override-1"><div class="collapsible-div max-height-300" id=screenshots-subsection ${h(this._screenshotsElement)}>${this._getScreenshots()}</div><calcite-fab appearance=outline-fill class=${`align-self-center ${i}`} .icon=${t} kind=neutral @click=${()=>{this._screenshotsElement.value?.classList.toggle("expanded"),this._isScreenshotsRowExpanded=this._screenshotsElement.value.classList.contains("expanded")}} .text=${e} text-enabled></calcite-fab></div></calcite-panel></calcite-accordion-item></calcite-accordion>`}_getScreenshots(){let e=this._itemProperties?.preview.filter(a=>a.format==="image")||[],t=this._configContextConsumer.value,i=this._isLoaded?"":"display-none",s=this._isLoaded?"display-none":"";return o`<calcite-loader class=${u(s)} label></calcite-loader><calcite-card-group class=${`card-group ${i}`} .label=${this._translations.solutionOverview}>${e.reduce((a,l)=>{let c=k(this.card?.id||"",l.name,t.authentication),p;return t.agoBasedEnterpriseSolutionsGroupId&&t.isEnterprise&&(p=k(this.card?.id||"",l.name,void 0,t.agolPortalUrl)),this.card?.id?a.push(o`<calcite-card class=${`${this.isMobile?"is-mobile":"cursor-pointer not-mobile"}`} .label=${l.alt} @click=${()=>this._openScreenshotGallery(l)} @keydown=${r=>V(r,()=>this._openScreenshotGallery(l))}><div class="card-image-wrap" slot=thumbnail><img alt=${l.alt??b} class="thumbnail card-image" slot=thumbnail src=${(p||c)??b}>${!this.isMobile&&o`<div class="hover-text">${this._translations.openInGallery}</div>`||""}</div></calcite-card>`):a.push(""),a},[])}</calcite-card-group>`}_openScreenshotGallery(e){if(!this.isMobile){this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Screenshot Gallery",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]});let t=this._screenshotsDialogRef.value;t&&(t.screenshot=e,t.open=!0)}}_getOverviewRow(){return o`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._overviewAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.solutionDetails}</div>${this._getDescriptionRow()}${this._getInformationProductsRow()}</calcite-accordion-item></calcite-accordion>`}_getDescriptionRow(){return o`<div class="display-flex flex-direction-column"><div class="font-color-2 font-1 margin-top-0 line-height-xxl padding-bottom-xxl" tabindex=0>${this.card?.snippet}</div><div class="font-color-2 font-1 margin-top-0 line-height-xxl padding-bottom-xxl" .innerHTML=${this.card?.description??""} tabindex=0></div></div>`}_getInformationProductsRow(){return o`<div class="display-flex flex-direction-column font-1 line-height-xxl font-color-2"><span tabindex=0>${this.card?.title?this._translations.informationProductsSubText.replace("{{solutionTitle}}",this.card.title):""}</span><calcite-table bordered caption class="padding-top-1">${this._getInformationTableHeaderRow()}${this._getInformationTableRows()}</calcite-table><p tabindex=0>${this._translations.informationProductsFooterText}</p></div>`}_getInformationTableHeaderRow(){return o`<calcite-table-row slot=table-header><calcite-table-header .heading=${this._translations.solutionItem}></calcite-table-header><calcite-table-header .heading=${this._translations.description}></calcite-table-header><calcite-table-header .heading=${this._translations.minimumUserType}></calcite-table-header></calcite-table-row>`}_getInformationTableRows(){return(this._itemProperties?.infoProducts||[]).map(e=>o`<calcite-table-row><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.item)??""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.description)??""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.userType)??""}></p></calcite-table-cell></calcite-table-row>`)}_getReleaseNotesRow(){return o`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._releaseNotesAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.releaseNotes}</div><div class="display-flex flex-direction-column"><calcite-table bordered caption>${this._getReleaseNotesTableHeaderRow()}${this._getReleaseNotesTableRows()}</calcite-table></div></calcite-accordion-item></calcite-accordion>`}_getReleaseNotesTableHeaderRow(){return o`<calcite-table-row slot=table-header><calcite-table-header .heading=${this._translations.version}></calcite-table-header><calcite-table-header .heading=${this._translations.description}></calcite-table-header></calcite-table-row>`}_getReleaseNotesTableRows(){return(this._itemProperties?.releaseNotes||[])?.map(e=>o`<calcite-table-row><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.version)??""}></p></calcite-table-cell><calcite-table-cell><p class="table-cell" .innerHTML=${_(e.description)??""}></p></calcite-table-cell></calcite-table-row>`)}_getRelatedResourcesRow(e){return o`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._relatedResourcesAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.relatedResources}</div><div class="display-flex flex-direction-row">${e.map(()=>{o`<solution-resource-card></solution-resource-card>`})}</div></calcite-accordion-item></calcite-accordion>`}_getRelatedResources(){return[]}_getYouMayAlsoLikeRow(e){let t=this._showYouMayAlsoLikeShowMore?"":"display-none",i=this._isYouMayAlsoLikeRowExpanded?this._translations.showLess:this._translations.showMore,s=this._isYouMayAlsoLikeRowExpanded?"arrow-up":"arrow-down",a=this._isYouMayAlsoLikeRowExpanded?"":{height:`${this._youMayAlsoLikeBaseHeight}px`};return o`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._youMayAlsoLikeAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.youMayAlsoLike}</div><div class="display-flex flex-direction-column"><div class="collapsible-div" id=you-may-also-like-subsection style=${D(a)} ${h(this._youMayAlsoLikeElement)}><div class="display-flex flex-direction-row"><calcite-card-group class="card-group" .label=${this._translations.youMayAlsoLike}>${e.map((l,c)=>o`<solution-details-card .id=${`you-may-also-like-${c}`} .card=${l} class="padding-2px" source=you-may-also-like .referrerSolutionId=${this.card?.deployCommonId||""} .referrerSolutionTitle=${this.card?.title||""} .referrerSolutionVersion=${this.card?.deployVersion||""}></solution-details-card>`)}</calcite-card-group></div></div><calcite-fab appearance=outline-fill class=${`align-self-center ${t}`} .icon=${s} kind=inverse @click=${()=>{this._youMayAlsoLikeElement.value?.classList.toggle("expanded"),this._isYouMayAlsoLikeRowExpanded=this._youMayAlsoLikeElement.value.classList.contains("expanded")}} .text=${i} text-enabled></calcite-fab></div></calcite-accordion-item></calcite-accordion>`}_getYouMayAlsoLikeCards(){let e=this._itemProperties?.relatedSolutions||[];return this._allCards.filter(t=>e.indexOf(t.deployCommonId)>-1)}_getTermsOfUseRow(){return o`<calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded ${h(this._termsOfUseAccordionItemElement)}><div class="margin-block-start-end-0 heading-font" slot=content-start>${this._translations.termsOfUse}</div><div class="font-color-2" .innerHTML=${(this.card?.licenseInfo||"")??""} tabindex=0></div></calcite-accordion-item></calcite-accordion>`}_openDeploy(){if(this._configContextConsumer.value.authentication.IsSignedIn){let e=this._deployDialogRef.value;e&&(this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Deploy Dialog Opened",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),e.userOptions=this._userOptions,e.open=!0)}else this._configContextConsumer.value.authentication.signIn("deploy")}_openUrl(e){window.open(e,"_blank")}_handleWatchDemoClick(e){this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Watch Demo",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),this._openUrl(e)}_handleLearnMoreClick(){this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),this._openUrl(this.card?.learnMoreUrl||"")}async _detailsCardSelected(e){this.card=e.detail,this.el.scrollIntoView(!0),this._onResize(),this._missingPrivilegeMessages=void 0,await this._getItemData(),this._expandAccordions()}_expandAccordions(){this._overviewAccordionItemElement.value&&(this._overviewAccordionItemElement.value.expanded=!0),this._releaseNotesAccordionItemElement.value&&(this._releaseNotesAccordionItemElement.value.expanded=!0),this._relatedResourcesAccordionItemElement.value&&(this._relatedResourcesAccordionItemElement.value.expanded=!0),this._screenshotsAccordionItemElement.value&&(this._screenshotsAccordionItemElement.value.expanded=!0),this._termsOfUseAccordionItemElement.value&&(this._termsOfUseAccordionItemElement.value.expanded=!0),this._youMayAlsoLikeAccordionItemElement.value&&(this._youMayAlsoLikeAccordionItemElement.value.expanded=!0)}async _getItemData(){let e=this._configContextConsumer.value,t=e?.agoBasedEnterpriseSolutionsGroupId&&e?.isEnterprise?e.anonAgolSession:e?.userSession,i=await A(this.card.id,t),s=await R(this.card.id,t);this._itemProperties=s.properties,this.itemPropertiesFetched.emit(this._itemProperties);let a=B(i,this.card.typeKeywords,e?.authentication);this._privileges=t.username?a:[],this._userPrivileges=e?.authentication&&e?.userSession?await q(e.authentication,e.userSession,e.authentication.PortalUserPrivileges):[];let l=this._privileges.filter(p=>!this._userPrivileges.includes(p));this._missingPrivilegeMessages=z(this._translations,l),this._isDeployDisabled=this._missingPrivilegeMessages&&(this._missingPrivilegeMessages.leadingMessages.length>0||this._missingPrivilegeMessages.bulletedMessages.length>0||this._missingPrivilegeMessages.trailingMessages.length>0);let c=i.params?await this.formatParams(i.params):[];this._userOptions=c,this._templates=i.templates,this.templatesFetched.emit(i.templates),this._checkUrlParametersForAutoDeployment(),this._isLoaded=!0,this._showLoader&&(this._showLoader=!1,this._isDeployDisabled||this._openDeploy())}formatParams(e){let t=this._configContextConsumer.value.userSession,i=[],s=e?Object.keys(e):[],a={id:"",props:[],accordionDisplay:!1};if(s.length>0){let l=[];return s.forEach(c=>{let p=e[c];p.valueType&&p.valueType.toLowerCase()==="itemid"&&l.push(this._findExistingItem(c,"Feature Service",t.username||""))}),Promise.all(l).then(c=>{let p={};return c.forEach(r=>{if(r.query&&r.results&&r.results.length>0){let W=r.query.split(" ")[0].replace("typekeywords:source-","");p[W]={resultId:r.results[0].id,response:r.results[0]}}}),s.forEach(r=>{if(r==="serviceLearnMore"){this._configureLearnMore=e[r],alert(this._configureLearnMore),delete e[r];return}e[r].enterpriseIDMapping&&(this._customDeploymentMappings[r]=e[r].enterpriseIDMapping),a.id=r,p[r]&&(e[r].existingItemId=p[r].resultId,this.updateUserProp(e[r],p[r].response)),this.updateOption(e[r],a,r)}),i.push(a),Promise.resolve(i)}).catch(()=>Promise.resolve([]))}else return Promise.resolve([])}_findExistingItem(e,t,i){let s=this._configContextConsumer.value.userSession;return G(`typekeywords:source-${e} type:${t} owner:${i}`,s)}updateUserProp(e,t){let i=e.itemType?.toLowerCase()==="feature service",s=new RegExp(i?this._regexFsUrl:e.itemType,"iu"),a=$(t,i?"url":"type","")||"",l=a!==""&&s.test(a);return e.responseValue=l?a:"",e.name=l&&v(t,"name")||"",e.title=l&&v(t,"title")||"",e.itemType=l?v(t,"type"):e.itemType,e.validId=l,e.itemUrl=Y(t.id,this._configContextConsumer.value.authentication),l}updateOption(e,t,i){let s=e.default||"",a=typeof s,l=s.toString();this._setFeatureServiceProps(e);let c=this.getValidation(e,l);t.props.push({id:i,outType:a,prop:i,itemType:e.itemType||"",responseValue:e.responseValue||"",label:e.label||"",choices:e.choices||[],valueType:e.valueType.toLowerCase(),attributes:e.attributes||{},value:e.existingItemId&&e.valueType.toLowerCase()==="itemid"?e.existingItemId:l,default:l,srSearchText:l,autoSelect:l!=="",...c,loading:!1,validId:!0,tooltip:e.tooltip||"",name:e.name||"",title:e.title||"",itemUrl:e.itemUrl||""})}_setFeatureServiceProps(e){e.valueType&&e.valueType.toLowerCase()==="itemid"&&T(e,"attributes.required","true")}getValidation(e,t){let i="",s=v(e,"validation.message")||"",a=!0;return v(e,"attributes.required")==="true"&&(i=$(e,"validation.expression","\\S{1,}"),a=new RegExp(i).test(t)),e.valueType&&e.valueType.toLowerCase()==="itemid"&&(i=this._regexID,s=this._translations.configure.invalidID),{valid:a,validation:{expression:i,message:s}}}_allCardsFetched(e){this._allCards=e.detail}_onResize(){this._showYouMayAlsoLikeShowMore=(this._youMayAlsoLikeElement.value?.scrollHeight||0)>this._youMayAlsoLikeBaseHeight,this._showScreenshotsShowMore=(this._screenshotsElement.value?.scrollHeight||0)>this._screenshotsRowBaseHeight+2}_cleanupPanel(){this.el.scrollIntoView(!0),this._isScreenshotsRowExpanded=!1,this._showScreenshotsShowMore=!1,this._screenshotsElement.value?.classList.remove("expanded"),this._isYouMayAlsoLikeRowExpanded=!1,this._showYouMayAlsoLikeShowMore=!1,this._youMayAlsoLikeElement.value?.classList.remove("expanded"),this._privilegePopoverRef.value?.open&&(this._privilegePopoverRef.value.open=!1),this._isDeployDisabled=!1,this._isLoaded=!1,this._showLoader=!1,this._expandAccordions()}_deployProgressStart(e){this._deploymentStartTime=Date.now(),this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Deploy Started",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),this._deployingDialogRef.value&&(this._deployingDialogRef.value.open=!0,this._deployingDialogRef.value.abortController=e.detail),this._deployDialogRef.value&&this._deployDialogRef.value.classList.add("display-none")}_deployProgessUpdated(e){let t=e.detail;this._deployingDialogRef.value.deploymentProgress=t.progress}_closeDialogs(e=!1){if(this._cancellationStartTime!==null){let t=f(this._cancellationStartTime);this._telemetry?.logEvent({category:m.SOLUTION_DETAILS,action:"Deploy Canceled",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""],metrics:[this._deployToCancelDuration,t]}),this._cancellationStartTime=null,this._deployToCancelDuration=0}this._deployingDialogRef.value.close(),e?this._deployDialogRef.value.open=!0:this._deployDialogRef.value.close(),this._deployDialogRef.value.classList.remove("display-none")}_handleDeployAppTabSelected(e){e.detail==="details"&&this.sortTypeChanged.emit("")}_checkPermissionsBeforeDeploy(){this._isLoaded?this._openDeploy():this._configContextConsumer.value.authentication?.IsSignedIn?this._showLoader=!0:this._openDeploy()}};C("solution-details-panel",I);return I},a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import d from"./
|
|
2
|
+
import d from"./C2MDLUTX.js";import"./NQXUGAR7.js";import c from"./FL74XITX.js";import b from"./KKI72ISR.js";import"./4T7P5RXF.js";import a from"./RTSKNY33.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import"./VU3OQQKP.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,a])=>{return a},a,b,c,d)
|