@esri/solutions-components 5.0.4 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/cdn/{UB33RJV2.js → 23DKMPGJ.js} +1 -1
  2. package/dist/cdn/{4WNB4SNS.js → 2ECRQJCU.js} +1 -1
  3. package/dist/cdn/{NGBSDZLF.js → 2JBJVGPJ.js} +1 -1
  4. package/dist/cdn/{3ZOEAKII.js → 2YCDW2EI.js} +1 -1
  5. package/dist/cdn/{36QZL2SP.js → 33HIGVEX.js} +1 -1
  6. package/dist/cdn/{HVZTHZYK.js → 4O4QS3DG.js} +1 -1
  7. package/dist/cdn/{F7DGHROD.js → 57INLFON.js} +1 -1
  8. package/dist/cdn/{44QGF64X.js → 5BEMMNL7.js} +1 -1
  9. package/dist/cdn/{RVR6SP4R.js → 5G3AHODR.js} +1 -1
  10. package/dist/cdn/{QOM6K67N.js → 5QP3RIEO.js} +1 -1
  11. package/dist/cdn/{O24ZIQLV.js → 5QSIKX2L.js} +1 -1
  12. package/dist/cdn/{5IWB7DXV.js → 5YORDAVH.js} +1 -1
  13. package/dist/cdn/{KAOZIOH3.js → 67TUHEUB.js} +1 -1
  14. package/dist/cdn/{TTKCR26F.js → 6HNQQRYK.js} +1 -1
  15. package/dist/cdn/{575KOORD.js → 6LSHZOMB.js} +1 -1
  16. package/dist/cdn/{32ZJRLO4.js → 6QODI424.js} +1 -1
  17. package/dist/cdn/{AXGMN3DZ.js → 7DOH2ZMP.js} +1 -1
  18. package/dist/cdn/{CPLUG3BV.js → ADJCIRZS.js} +1 -1
  19. package/dist/cdn/{ZB4IUY3Y.js → BA4FCDQY.js} +1 -1
  20. package/dist/cdn/{IWBYP44R.js → BADKNCL4.js} +1 -1
  21. package/dist/cdn/{5ISRU637.js → BCTFO27G.js} +1 -1
  22. package/dist/cdn/{N3WEX2WW.js → BGBLGDVO.js} +1 -1
  23. package/dist/cdn/BXKV2QC3.js +2 -0
  24. package/dist/cdn/{M5MQY5WC.js → DV233ITZ.js} +1 -1
  25. package/dist/cdn/{L65LKW2L.js → DY3BUOEI.js} +1 -1
  26. package/dist/cdn/EIQZRLWQ.js +2 -0
  27. package/dist/cdn/{CKHU23WZ.js → EKZZ7R2V.js} +1 -1
  28. package/dist/cdn/{PO4PTHS6.js → EPMMVHPO.js} +1 -1
  29. package/dist/cdn/{OZIXJ6HO.js → EQXQ6YNY.js} +1 -1
  30. package/dist/cdn/{L26O3GTC.js → HNPTTIXC.js} +1 -1
  31. package/dist/cdn/{OBMP2HIH.js → IHDRZQU4.js} +1 -1
  32. package/dist/cdn/{G3KEPG5G.js → IQ6XED24.js} +1 -1
  33. package/dist/cdn/{AFNUHTXR.js → JSX7H42C.js} +1 -1
  34. package/dist/cdn/{IGM6M6VG.js → K2BF5736.js} +1 -1
  35. package/dist/cdn/{3L4JPZ3K.js → K7O46PDI.js} +1 -1
  36. package/dist/cdn/{IB4U627P.js → KUZQPBVI.js} +1 -1
  37. package/dist/cdn/{ZRDBHNKL.js → LLIZZGSY.js} +1 -1
  38. package/dist/cdn/{G235DVXM.js → M2MN2QB7.js} +1 -1
  39. package/dist/cdn/{P3DGGTC5.js → M6DR7QBF.js} +1 -1
  40. package/dist/cdn/{SXF342EH.js → MDHKDE77.js} +1 -1
  41. package/dist/cdn/{Q5LUK5CM.js → MJDNGEFJ.js} +1 -1
  42. package/dist/cdn/{GKBTOBYA.js → MP5X6HGT.js} +1 -1
  43. package/dist/cdn/{YA5DNYPF.js → MSGOASUF.js} +1 -1
  44. package/dist/cdn/{G2FGKUNI.js → MWCQXZOT.js} +1 -1
  45. package/dist/cdn/{VPSUD6VW.js → N6EQBPC2.js} +1 -1
  46. package/dist/cdn/{ZZQ73LQE.js → NARQQKRW.js} +1 -1
  47. package/dist/cdn/{R7OZWCO2.js → NJJEOZ2G.js} +1 -1
  48. package/dist/cdn/{FZ5LAVZL.js → NORNRIIE.js} +1 -1
  49. package/dist/cdn/{3UVV2MNJ.js → QPRIL54J.js} +1 -1
  50. package/dist/cdn/{R2KIT5QB.js → QZZ2CQWS.js} +1 -1
  51. package/dist/cdn/{DCOGVHCK.js → R47OTDC2.js} +1 -1
  52. package/dist/cdn/{DQY6HKSD.js → RBCOT3CJ.js} +1 -1
  53. package/dist/cdn/{4WIRUOFC.js → RGFLXW4Q.js} +1 -1
  54. package/dist/cdn/{5QZHZP3H.js → RQEYXUDW.js} +1 -1
  55. package/dist/cdn/{OXUKEA5J.js → RTVWZSKJ.js} +1 -1
  56. package/dist/cdn/{MPJ5N4H3.js → RYRVUHB7.js} +1 -1
  57. package/dist/cdn/{RTZ7K25B.js → S42I3DOW.js} +1 -1
  58. package/dist/cdn/SFZEAERJ.js +2 -0
  59. package/dist/cdn/{643OMX6D.js → SIUK7OO4.js} +1 -1
  60. package/dist/cdn/{VW2776MR.js → SQYHEYVJ.js} +1 -1
  61. package/dist/cdn/{SIUGRN4Q.js → TAZIMIFF.js} +1 -1
  62. package/dist/cdn/{25XM6BTJ.js → TF3C523O.js} +1 -1
  63. package/dist/cdn/{YPV5332T.js → TGH6D5IY.js} +1 -1
  64. package/dist/cdn/{CS224C6F.js → TZPSZTAH.js} +1 -1
  65. package/dist/cdn/{UV3U3JVV.js → UV4D2QFA.js} +1 -1
  66. package/dist/cdn/{SVY3DB6Z.js → VEUUNFWR.js} +1 -1
  67. package/dist/cdn/{2ZUQERRA.js → VGIXK3YM.js} +1 -1
  68. package/dist/cdn/{BE7WFZ3U.js → VPMYUEFF.js} +1 -1
  69. package/dist/cdn/{NRATHJBP.js → VVURRW2F.js} +1 -1
  70. package/dist/cdn/{IHGHHRTQ.js → VW52F2EM.js} +1 -1
  71. package/dist/cdn/{LLCJDTO5.js → W33YWBF5.js} +1 -1
  72. package/dist/cdn/{QCX5HMBY.js → WXE6AACQ.js} +1 -1
  73. package/dist/cdn/{H4AJJYCF.js → X5T6TZW3.js} +1 -1
  74. package/dist/cdn/{UGC66GAG.js → XLBMKYPQ.js} +1 -1
  75. package/dist/cdn/{V7HBTLA3.js → XWJFP7BZ.js} +1 -1
  76. package/dist/cdn/{TWDX3YCN.js → Y3CBLTF5.js} +1 -1
  77. package/dist/cdn/{FYYI54CE.js → YE7JMYIB.js} +1 -1
  78. package/dist/cdn/{ETSHZHZS.js → YT2I5RUD.js} +1 -1
  79. package/dist/cdn/{NNF53M5N.js → YUWQWOOF.js} +1 -1
  80. package/dist/cdn/{5SWGGS6Z.js → Z6NMQGEQ.js} +1 -1
  81. package/dist/cdn/{HV4LZMLU.js → ZD3OZO6O.js} +1 -1
  82. package/dist/cdn/{N2D6RJ3H.js → ZFSMRICA.js} +1 -1
  83. package/dist/cdn/{WDDMJBPJ.js → ZNG42S47.js} +1 -1
  84. package/dist/cdn/index.js +1 -1
  85. package/dist/chunks/runtime.js +2 -2
  86. package/dist/components/layer-list/customElement.js +1 -1
  87. package/dist/docs/api.json +1 -1
  88. package/dist/docs/docs.json +1 -1
  89. package/dist/docs/web-types.json +1 -1
  90. package/dist/solutions-components_commit.txt +7 -4
  91. package/package.json +1 -1
  92. package/dist/cdn/2GBXQUSA.js +0 -2
  93. package/dist/cdn/HW7HHHMK.js +0 -2
  94. package/dist/cdn/RORBHQJC.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./TWDX3YCN.js";import a from"./O24ZIQLV.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"./M5MQY5WC.js";import{k as L}from"./2IHQU2FX.js";import{b as C}from"./HW7HHHMK.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:F,c:N,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 N(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._itemFetched=!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:F,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,_itemFetched: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._itemFetched?"":"display-none",s=this._itemFetched?"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(){this._itemFetched=!1;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._itemFetched=!0,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._itemFetched=!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)
2
+ import c from"./Y3CBLTF5.js";import a from"./5QSIKX2L.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"./DV233ITZ.js";import{k as L}from"./2IHQU2FX.js";import{b as C}from"./EIQZRLWQ.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:F,c:N,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 N(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._itemFetched=!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:F,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,_itemFetched: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._itemFetched?"":"display-none",s=this._itemFetched?"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(){this._itemFetched=!1;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._itemFetched=!0,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._itemFetched=!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 c from"./KDIUYXBA.js";import b from"./UUYUTETH.js";import{a as L}from"./M5MQY5WC.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as m}from"./HW7HHHMK.js";import{H as p,h as y,i as a,r as l,u as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([n,_,,{a:w,c:u,e:f}])=>{async function I(h,t){let{style:i="decimal",places:e=2}=t||{},s=n.convertNumberFormatToIntlOptions({places:e,digitSeparator:!0});return s.style=i,n.formatNumber(h,s)}var x=y`@layer{:host{display:block}.notice-msg{width:calc(100% - 20px);padding:10px}.layer-name{font-weight:500;word-break:break-word}.feature-count{padding:0 10px}}`,o=class extends p{constructor(){super(),this.layers=[],this.showFeatureCount=!0,this.showNextIcon=!1,this.applyLayerViewFilter=!1,this.filterByMapExtent=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=L({name:"layer-list",blocking:!0}),this.layerSelect=l(),this.layersListLoaded=l(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={mapView:0,layers:0,showFeatureCount:5,showNextIcon:5,applyLayerViewFilter:5,filterByMapExtent:5,_noLayersToDisplay:16,_mapLayerIds:16,_isLoading:16,_translations:16}}static{this.styles=x}static{this.shadowRootOptions=d}willUpdate(t){t.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}filterByMapExtentWatchHandler(t){t?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(){await this.setLayers()}async selectedLanguageUpdated(t){await this.setLayers()}async load(){this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.setLayers()}render(){return a`${this._isLoading&&a`<calcite-loader label scale=m></calcite-loader>`||""}${!this._isLoading&&this.mapView&&this._noLayersToDisplay&&a`<calcite-notice class="notice-msg" icon=layers-reference kind=danger open><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.noLayerToDisplayErrorMsg}</div></calcite-notice>`||""}${!this._isLoading&&this.mapView&&a`<calcite-list label selection-appearance=border selection-mode=none>${this.filterByMapExtent&&this._mapLayerIds.length>0&&this.getExtentNotice()||""}${this.renderLayerList()}</calcite-list>`||""}`}initializeMapExtentFilter(){this._filterByMapExtentHandle=_.when(()=>this.mapView?.stationary,()=>{this.setLayers()},{initial:!0})}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){let t=[];if(this.mapView){this._layerItemsHash=await w(this.mapView,!0);let i=await f(this.mapView);for(let e of i)if(e?.type==="feature"&&this.showFeatureCount){let s=e.createQuery();if(e?.definitionExpression&&(s.where=s.where+" AND "+e.definitionExpression),this.applyLayerViewFilter){let r=await u(this.mapView,e.id);r?.filter?.where&&(s.where=s.where?s.where+" AND "+r.filter.where:r.filter.where)}s.geometry=this.filterByMapExtent?this.mapView.extent:null;let c=e.queryFeatureCount(s);t.push(c),c.then(async r=>{let g=Number.isNaN(r)?"":await I(r,{places:0,style:"decimal"});this._layerItemsHash?.[e.id]&&(this._layerItemsHash[e.id].formattedFeatureCount=g)})}await Promise.all(t).then(()=>{let e=this._layerItemsHash&&this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=e?.reverse()||[],this.handleNoLayersToDisplay()},()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()})}}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){let i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce((e,s)=>(i.indexOf(s)>-1&&e.push(s),e),[])}renderLayerList(){return this._mapLayerIds.length>0?this._mapLayerIds.reduce((t,i)=>{if(this._layerItemsHash&&this._layerItemsHash[i]){let e=this.getLayerListItem(i);e&&t.push(e)}return t},[]):void 0}getLayerListItem(t){let i=this._layerItemsHash&&this._layerItemsHash[t].name,e=this._layerItemsHash&&this._layerItemsHash[t].formattedFeatureCount;return a`<calcite-list-item @calciteListItemSelect=${()=>{this.onLayerItemSelected(t)}}><div class="layer-name" slot=content-start>${i}</div>${this.showFeatureCount&&e!==void 0&&e!==""&&a`<div class="feature-count" slot=content-end>${`(${e})`}</div>`||""}${this.showNextIcon&&a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`||""}</calcite-list-item>`}getExtentNotice(){return a`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}onLayerItemSelected(t){this._layerItemsHash&&this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t]?.name})}};m("layer-list",o);return o},"intl","core/reactiveUtils",b,c)
2
+ import c from"./KDIUYXBA.js";import b from"./UUYUTETH.js";import{a as L}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as m}from"./EIQZRLWQ.js";import{H as p,h as y,i as a,r as l,u as d}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([n,_,,{a:w,c:u,e:f}])=>{async function I(h,t){let{style:i="decimal",places:e=2}=t||{},s=n.convertNumberFormatToIntlOptions({places:e,digitSeparator:!0});return s.style=i,n.formatNumber(h,s)}var x=y`@layer{:host{display:block}.notice-msg{width:calc(100% - 20px);padding:10px}.layer-name{font-weight:500;word-break:break-word}.feature-count{padding:0 10px}}`,o=class extends p{constructor(){super(),this.layers=[],this.showFeatureCount=!0,this.showNextIcon=!1,this.applyLayerViewFilter=!1,this.filterByMapExtent=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=L({name:"layer-list",blocking:!0}),this.layerSelect=l(),this.layersListLoaded=l(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={mapView:0,layers:0,showFeatureCount:5,showNextIcon:5,applyLayerViewFilter:5,filterByMapExtent:5,_noLayersToDisplay:16,_mapLayerIds:16,_isLoading:16,_translations:16}}static{this.styles=x}static{this.shadowRootOptions=d}willUpdate(t){t.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}filterByMapExtentWatchHandler(t){t?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(){await this.setLayers()}async selectedLanguageUpdated(t){await this.setLayers()}async load(){this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.setLayers()}render(){return a`${this._isLoading&&a`<calcite-loader label scale=m></calcite-loader>`||""}${!this._isLoading&&this.mapView&&this._noLayersToDisplay&&a`<calcite-notice class="notice-msg" icon=layers-reference kind=danger open><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.noLayerToDisplayErrorMsg}</div></calcite-notice>`||""}${!this._isLoading&&this.mapView&&a`<calcite-list label selection-appearance=border selection-mode=none>${this.filterByMapExtent&&this._mapLayerIds.length>0&&this.getExtentNotice()||""}${this.renderLayerList()}</calcite-list>`||""}`}initializeMapExtentFilter(){this._filterByMapExtentHandle=_.when(()=>this.mapView?.stationary,()=>{this.setLayers()},{initial:!0})}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){let t=[];if(this.mapView){this._layerItemsHash=await w(this.mapView,!1);let i=await f(this.mapView);for(let e of i)if(e?.type==="feature"&&this.showFeatureCount){let s=e.createQuery();if(e?.definitionExpression&&(s.where=s.where+" AND "+e.definitionExpression),this.applyLayerViewFilter){let r=await u(this.mapView,e.id);r?.filter?.where&&(s.where=s.where?s.where+" AND "+r.filter.where:r.filter.where)}s.geometry=this.filterByMapExtent?this.mapView.extent:null;let c=e.queryFeatureCount(s);t.push(c),c.then(async r=>{let g=Number.isNaN(r)?"":await I(r,{places:0,style:"decimal"});this._layerItemsHash?.[e.id]&&(this._layerItemsHash[e.id].formattedFeatureCount=g)})}await Promise.all(t).then(()=>{let e=this._layerItemsHash&&this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=e?.reverse()||[],this.handleNoLayersToDisplay()},()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()})}}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){let i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce((e,s)=>(i.indexOf(s)>-1&&e.push(s),e),[])}renderLayerList(){return this._mapLayerIds.length>0?this._mapLayerIds.reduce((t,i)=>{if(this._layerItemsHash&&this._layerItemsHash[i]){let e=this.getLayerListItem(i);e&&t.push(e)}return t},[]):void 0}getLayerListItem(t){let i=this._layerItemsHash&&this._layerItemsHash[t].name,e=this._layerItemsHash&&this._layerItemsHash[t].formattedFeatureCount;return a`<calcite-list-item @calciteListItemSelect=${()=>{this.onLayerItemSelected(t)}}><div class="layer-name" slot=content-start>${i}</div>${this.showFeatureCount&&e!==void 0&&e!==""&&a`<div class="feature-count" slot=content-end>${`(${e})`}</div>`||""}${this.showNextIcon&&a`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`||""}</calcite-list-item>`}getExtentNotice(){return a`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}onLayerItemSelected(t){this._layerItemsHash&&this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t]?.name})}};m("layer-list",o);return o},"intl","core/reactiveUtils",b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./YA5DNYPF.js";import b from"./IHGHHRTQ.js";import"./6MZ227J7.js";import a from"./O24ZIQLV.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./M5MQY5WC.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"./HW7HHHMK.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
2
+ import c from"./MSGOASUF.js";import b from"./VW52F2EM.js";import"./6MZ227J7.js";import a from"./5QSIKX2L.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./DV233ITZ.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"./EIQZRLWQ.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import d from"./O24ZIQLV.js";import{b}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as m}from"./M5MQY5WC.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{b as g}from"./HW7HHHMK.js";import{F as a,G as n,H as f,K as i,L as c,h as v,i as e,j as h}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([k,R,{K:y,b:x,p:w}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-foreground-1);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d)
2
+ import d from"./5QSIKX2L.js";import{b}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as m}from"./DV233ITZ.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{b as g}from"./EIQZRLWQ.js";import{F as a,G as n,H as f,K as i,L as c,h as v,i as e,j as h}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([k,R,{K:y,b:x,p:w}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-foreground-1);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./Q5LUK5CM.js";import a from"./O24ZIQLV.js";import{b as C}from"./PZ4L77M5.js";import{rb as v,sa as S,sb as T,tb as $}from"./JE7L7M3J.js";import{a as D}from"./M5MQY5WC.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{b as I}from"./HW7HHHMK.js";import{F as m,G as f,H as y,J as u,h as g,i as r,r as c}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{J:V,K:w,b:b,f:_},{a:P}])=>{var N=g`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`,x=class extends y{constructor(){super(...arguments),this.open=!1,this.source="Card Dropdown",this.solutionData={},this.templateInfos=[],this._saveDisabled=!1,this._displayTemplateInfos=[],this._hasNameLengthError=!1,this._nonSolutionDependencyItems=[],this._solutionItemsTitlesUpdating=!1,this._translations=D({name:"solution-configure-titles",blocking:!0}),this._configContextConsumer=C({context:b,subscribe:!0}),this._defaultPrefix="",this._defaultSuffix="",this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1,this._prefixRef=m(),this._prefixValue="",this._suffixRef=m(),this._suffixValue="",this._templateInfos=[],this._originalTitles=[],this.solutionConfigureTitlesBeforeClose=c(),this.solutionItemsTitlesChanged=c()}static{this.properties={card:0,open:5,source:1,solutionData:1,templateInfos:0,_saveDisabled:16,_displayTemplateInfos:16,_hasNameLengthError:16,_nonSolutionDependencyItems:16,_solutionItemsTitlesUpdating:16,_translations:16}}static{this.styles=N}async willUpdate(i){if(i.has("templateInfos")&&(this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._updateTemplates()),i.has("open")){let t=i.get("open");if(this.open&&!t){await this._updatePrefixSuffix(),this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._originalTitles=this._templateInfos.map(s=>({id:s.id,title:s.title})),this._updateTemplates();let e=await P(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=e._nonSolutionDependencyItems,await this._accordionRef?.expandFirstItem()}}}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){this._updateTemplates(),await this._updatePrefixSuffix()}async _updatePrefixSuffix(){this.solutionData=await S(this.card.id,this._configContextConsumer.value.userSession),this.solutionData.titles?.prefix&&(this._loadingDefaultPrefix=!0,this._defaultPrefix=this.solutionData.titles.prefix,this._prefixValue=this.solutionData.titles.prefix),this.solutionData.titles?.suffix&&(this._loadingDefaultSuffix=!0,this._defaultSuffix=this.solutionData.titles.suffix,this._suffixValue=this.solutionData.titles.suffix)}render(){return r`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${()=>{this.solutionConfigureTitlesBeforeClose.emit()}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`}_getPrefixSuffixControls(){let i=_(this._prefixValue,"item"),t=this._hasNameLengthError&&this._prefixValue.length>0,e=!i,s=!t,n=e?"display-none":"",h=s?"display-none":"",a=e&&s?"valid":"invalid",l=_(this._suffixValue,"item"),o=this._hasNameLengthError&&this._suffixValue.length>0,d=!l,p=!o,E=d?"display-none":"",W=p?"display-none":"",k=d&&p?"valid":"invalid";return this._saveDisabled=!e||!s||!d||!p||!this._hasChanges(),r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${a} .value=${this._prefixValue} ${f(this._prefixRef)}></calcite-input><calcite-input-message class=${u(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(h)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${k} .value=${this._suffixValue} ${f(this._suffixRef)}></calcite-input><calcite-input-message class=${u(E)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(W)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`}_getAccordion(){let i=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} ${f(async t=>{t&&(this._accordionRef=t)})}></solution-item-accordion></div>`}_getDialogButtons(){return r`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`}_prefixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._prefixValue=this._prefixRef.value?.value||"",this._updateTemplates()},500)}_suffixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._suffixValue=this._suffixRef.value?.value||"",this._updateTemplates()},500)}_updateTemplates(){this._templateInfos=this._templateInfos.map(t=>(this._loadingDefaultPrefix&&t.title.startsWith(this._prefixValue)&&(t.title=this._replaceStart(t.title,this._prefixValue,"")),this._loadingDefaultSuffix&&t.title.endsWith(this._suffixValue)&&(t.title=this._replaceAtEnd(t.title,this._suffixValue,"")),t));let i=JSON.parse(JSON.stringify(this._templateInfos));this._hasNameLengthError=!1,this._displayTemplateInfos=i.map(t=>{let e=this._prefixValue!=="",s=this._suffixValue!=="",n=this._defaultPrefix!=="",h=this._defaultSuffix!=="",a=t.title;e&&(n?this._originalTitles.find(o=>o.id===t.id)?.title.startsWith(this._defaultPrefix)?a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue):this._prefixValue!==this._defaultPrefix&&(a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue)):a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue));let l=a;return s&&(h?this._originalTitles.find(o=>o.id===t.id)?.title.endsWith(this._defaultSuffix)?l=this._applySuffixWithDuplicateCheck(a,this._suffixValue):this._suffixValue!==this._defaultSuffix&&(l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)):l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)),t.title=l,this._hasNameLengthError||(this._hasNameLengthError=t.title.length>V),t}),this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1}_replaceStart(i,t,e){return i.startsWith(t)?`${e}${i.slice(t.length)}`:i}_replaceAtEnd(i,t,e){return i.endsWith(t)?`${i.substring(0,i.length-t.length)}${e}`:i}_applyPrefixWithDuplicateCheck(i,t){return!t||i.startsWith(t)?i:t+i}_applySuffixWithDuplicateCheck(i,t){return!t||i.endsWith(t)?i:i+t}_hasChanges(){let i=this._defaultPrefix!==this._prefixValue,t=this._defaultSuffix!==this._suffixValue;return this._displayTemplateInfos.some(e=>{let s=this._originalTitles.find(n=>n.id===e.id);return s&&s.title!==e.title})||i||t}_closeDialog(){this.open=!1}async _commitNameChanges(){if(this._hasChanges()){this._telemetry?.logEvent({category:w.DEPLOYMENTS,action:"Rename Items",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._solutionItemsTitlesUpdating=!0;let i=this._displayTemplateInfos.reduce((t,e)=>{let s={id:e.id,title:e.title};return t.push(e.type==="Group"?T(s,this._configContextConsumer.value.userSession):v(s,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner})),t},[]);if(this.solutionData?.templates){let t={id:this.card.id},e={...this.solutionData,titles:{prefix:this._prefixValue,suffix:this._suffixValue}};i.push($(t,e,this._configContextConsumer.value.userSession,void 0,void 0,null,this.card?.owner))}await Promise.all(i),this._solutionItemsTitlesUpdating=!1,this.solutionItemsTitlesChanged.emit()}this._closeDialog()}};I("solution-configure-titles",x);return x},a,b)
2
+ import b from"./MJDNGEFJ.js";import a from"./5QSIKX2L.js";import{b as C}from"./PZ4L77M5.js";import{rb as v,sa as S,sb as T,tb as $}from"./JE7L7M3J.js";import{a as D}from"./DV233ITZ.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{b as I}from"./EIQZRLWQ.js";import{F as m,G as f,H as y,J as u,h as g,i as r,r as c}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{J:V,K:w,b:b,f:_},{a:P}])=>{var N=g`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`,x=class extends y{constructor(){super(...arguments),this.open=!1,this.source="Card Dropdown",this.solutionData={},this.templateInfos=[],this._saveDisabled=!1,this._displayTemplateInfos=[],this._hasNameLengthError=!1,this._nonSolutionDependencyItems=[],this._solutionItemsTitlesUpdating=!1,this._translations=D({name:"solution-configure-titles",blocking:!0}),this._configContextConsumer=C({context:b,subscribe:!0}),this._defaultPrefix="",this._defaultSuffix="",this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1,this._prefixRef=m(),this._prefixValue="",this._suffixRef=m(),this._suffixValue="",this._templateInfos=[],this._originalTitles=[],this.solutionConfigureTitlesBeforeClose=c(),this.solutionItemsTitlesChanged=c()}static{this.properties={card:0,open:5,source:1,solutionData:1,templateInfos:0,_saveDisabled:16,_displayTemplateInfos:16,_hasNameLengthError:16,_nonSolutionDependencyItems:16,_solutionItemsTitlesUpdating:16,_translations:16}}static{this.styles=N}async willUpdate(i){if(i.has("templateInfos")&&(this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._updateTemplates()),i.has("open")){let t=i.get("open");if(this.open&&!t){await this._updatePrefixSuffix(),this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._originalTitles=this._templateInfos.map(s=>({id:s.id,title:s.title})),this._updateTemplates();let e=await P(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=e._nonSolutionDependencyItems,await this._accordionRef?.expandFirstItem()}}}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){this._updateTemplates(),await this._updatePrefixSuffix()}async _updatePrefixSuffix(){this.solutionData=await S(this.card.id,this._configContextConsumer.value.userSession),this.solutionData.titles?.prefix&&(this._loadingDefaultPrefix=!0,this._defaultPrefix=this.solutionData.titles.prefix,this._prefixValue=this.solutionData.titles.prefix),this.solutionData.titles?.suffix&&(this._loadingDefaultSuffix=!0,this._defaultSuffix=this.solutionData.titles.suffix,this._suffixValue=this.solutionData.titles.suffix)}render(){return r`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${()=>{this.solutionConfigureTitlesBeforeClose.emit()}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`}_getPrefixSuffixControls(){let i=_(this._prefixValue,"item"),t=this._hasNameLengthError&&this._prefixValue.length>0,e=!i,s=!t,n=e?"display-none":"",h=s?"display-none":"",a=e&&s?"valid":"invalid",l=_(this._suffixValue,"item"),o=this._hasNameLengthError&&this._suffixValue.length>0,d=!l,p=!o,E=d?"display-none":"",W=p?"display-none":"",k=d&&p?"valid":"invalid";return this._saveDisabled=!e||!s||!d||!p||!this._hasChanges(),r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${a} .value=${this._prefixValue} ${f(this._prefixRef)}></calcite-input><calcite-input-message class=${u(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(h)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${k} .value=${this._suffixValue} ${f(this._suffixRef)}></calcite-input><calcite-input-message class=${u(E)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(W)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`}_getAccordion(){let i=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} ${f(async t=>{t&&(this._accordionRef=t)})}></solution-item-accordion></div>`}_getDialogButtons(){return r`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`}_prefixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._prefixValue=this._prefixRef.value?.value||"",this._updateTemplates()},500)}_suffixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._suffixValue=this._suffixRef.value?.value||"",this._updateTemplates()},500)}_updateTemplates(){this._templateInfos=this._templateInfos.map(t=>(this._loadingDefaultPrefix&&t.title.startsWith(this._prefixValue)&&(t.title=this._replaceStart(t.title,this._prefixValue,"")),this._loadingDefaultSuffix&&t.title.endsWith(this._suffixValue)&&(t.title=this._replaceAtEnd(t.title,this._suffixValue,"")),t));let i=JSON.parse(JSON.stringify(this._templateInfos));this._hasNameLengthError=!1,this._displayTemplateInfos=i.map(t=>{let e=this._prefixValue!=="",s=this._suffixValue!=="",n=this._defaultPrefix!=="",h=this._defaultSuffix!=="",a=t.title;e&&(n?this._originalTitles.find(o=>o.id===t.id)?.title.startsWith(this._defaultPrefix)?a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue):this._prefixValue!==this._defaultPrefix&&(a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue)):a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue));let l=a;return s&&(h?this._originalTitles.find(o=>o.id===t.id)?.title.endsWith(this._defaultSuffix)?l=this._applySuffixWithDuplicateCheck(a,this._suffixValue):this._suffixValue!==this._defaultSuffix&&(l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)):l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)),t.title=l,this._hasNameLengthError||(this._hasNameLengthError=t.title.length>V),t}),this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1}_replaceStart(i,t,e){return i.startsWith(t)?`${e}${i.slice(t.length)}`:i}_replaceAtEnd(i,t,e){return i.endsWith(t)?`${i.substring(0,i.length-t.length)}${e}`:i}_applyPrefixWithDuplicateCheck(i,t){return!t||i.startsWith(t)?i:t+i}_applySuffixWithDuplicateCheck(i,t){return!t||i.endsWith(t)?i:i+t}_hasChanges(){let i=this._defaultPrefix!==this._prefixValue,t=this._defaultSuffix!==this._suffixValue;return this._displayTemplateInfos.some(e=>{let s=this._originalTitles.find(n=>n.id===e.id);return s&&s.title!==e.title})||i||t}_closeDialog(){this.open=!1}async _commitNameChanges(){if(this._hasChanges()){this._telemetry?.logEvent({category:w.DEPLOYMENTS,action:"Rename Items",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._solutionItemsTitlesUpdating=!0;let i=this._displayTemplateInfos.reduce((t,e)=>{let s={id:e.id,title:e.title};return t.push(e.type==="Group"?T(s,this._configContextConsumer.value.userSession):v(s,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner})),t},[]);if(this.solutionData?.templates){let t={id:this.card.id},e={...this.solutionData,titles:{prefix:this._prefixValue,suffix:this._suffixValue}};i.push($(t,e,this._configContextConsumer.value.userSession,void 0,void 0,null,this.card?.owner))}await Promise.all(i),this._solutionItemsTitlesUpdating=!1,this.solutionItemsTitlesChanged.emit()}this._closeDialog()}};I("solution-configure-titles",x);return x},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./O24ZIQLV.js";import{b as r}from"./PZ4L77M5.js";import{d as u}from"./JE7L7M3J.js";import"./M5MQY5WC.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{b as l}from"./HW7HHHMK.js";import{H as o,h as s,i as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{A:m,b:c}])=>{var h=s`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.avatar-container{align-items:center;display:flex;flex-direction:row;padding-top:var(--calcite-spacing-lg)}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-user-full-name-text-color, var(--calcite-color-text-1))}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}.username{font-size:var(--calcite-font-size--1);color:var(--calcite-navigation-user-name-text-color, var(--calcite-color-text-2))}`,a=class extends o{constructor(){super(),this.lookupProfile=!1,this.username="",this._configContextConsumer=r({context:c,subscribe:!0}),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={fullname:1,lookupProfile:5,thumbnailUrl:1,username:1}}static{this.styles=h}loaded(){this.lookupProfile&&this._lookupOwnerProfile(this.username)}willUpdate(t){t.has("username")&&this.lookupProfile&&this._lookupOwnerProfile(this.username)}render(){return n`<div class="avatar-container"><calcite-avatar scale=m .username=${this.username} .thumbnail=${this.thumbnailUrl??void 0} .fullName=${this.fullname??void 0}></calcite-avatar><div class="text-container"><span class="full-name" tabindex=0>${this.fullname??""}</span><span class="username" tabindex=0>${this.username}</span></div></div>`}async _lookupOwnerProfile(t){if(this.fullname=void 0,this.thumbnailUrl="",this.lookupProfile&&this._configContextConsumer.value){let{userSession:i}=this._configContextConsumer.value;if(i)try{let e=await u({authentication:i,username:t});e&&(e.fullName&&(this.fullname=e.fullName),e.thumbnail&&(this.thumbnailUrl=i.portal+"/community/users/"+e.id+"/info/"+e.thumbnail+"?token="+i.token))}catch{console.log("user not found")}}}_updateThumbnailToken(t){this.thumbnailUrl&&this.thumbnailUrl!==""&&(this.thumbnailUrl=m(this.thumbnailUrl,t))}};l("solution-user-avatar",a);return a},a)
2
+ import a from"./5QSIKX2L.js";import{b as r}from"./PZ4L77M5.js";import{d as u}from"./JE7L7M3J.js";import"./DV233ITZ.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{b as l}from"./EIQZRLWQ.js";import{H as o,h as s,i as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{A:m,b:c}])=>{var h=s`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.avatar-container{align-items:center;display:flex;flex-direction:row;padding-top:var(--calcite-spacing-lg)}.full-name{margin-inline-start:0px;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-navigation-user-full-name-text-color, var(--calcite-color-text-1))}.text-container{margin-block-start:.125rem;display:flex;flex-direction:column;padding-inline:1rem;text-align:start}.username{font-size:var(--calcite-font-size--1);color:var(--calcite-navigation-user-name-text-color, var(--calcite-color-text-2))}`,a=class extends o{constructor(){super(),this.lookupProfile=!1,this.username="",this._configContextConsumer=r({context:c,subscribe:!0}),this.listenOn(window,"sessionRefreshed",t=>{this._updateThumbnailToken(t.detail)})}static{this.properties={fullname:1,lookupProfile:5,thumbnailUrl:1,username:1}}static{this.styles=h}loaded(){this.lookupProfile&&this._lookupOwnerProfile(this.username)}willUpdate(t){t.has("username")&&this.lookupProfile&&this._lookupOwnerProfile(this.username)}render(){return n`<div class="avatar-container"><calcite-avatar scale=m .username=${this.username} .thumbnail=${this.thumbnailUrl??void 0} .fullName=${this.fullname??void 0}></calcite-avatar><div class="text-container"><span class="full-name" tabindex=0>${this.fullname??""}</span><span class="username" tabindex=0>${this.username}</span></div></div>`}async _lookupOwnerProfile(t){if(this.fullname=void 0,this.thumbnailUrl="",this.lookupProfile&&this._configContextConsumer.value){let{userSession:i}=this._configContextConsumer.value;if(i)try{let e=await u({authentication:i,username:t});e&&(e.fullName&&(this.fullname=e.fullName),e.thumbnail&&(this.thumbnailUrl=i.portal+"/community/users/"+e.id+"/info/"+e.thumbnail+"?token="+i.token))}catch{console.log("user not found")}}}_updateThumbnailToken(t){this.thumbnailUrl&&this.thumbnailUrl!==""&&(this.thumbnailUrl=m(this.thumbnailUrl,t))}};l("solution-user-avatar",a);return a},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as h}from"./M5MQY5WC.js";import{b as p}from"./HW7HHHMK.js";import{H as d,h as r,i as l,l as c,r as n}from"./46DQNAMV.js";var y=r`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,a=class extends d{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this._sortedTemplateInfos=[],this._translations=h({name:"solution-item-accordion",blocking:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=n(),this.solutionItemSelect=n(),this.solutionTypeHover=n()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,_sortedTemplateInfos:16,_translations:16}}static{this.styles=y}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(e=>{e.selected&&(e.selected=!1),(e.parentElement?.parentElement).expanded&&((e.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates()}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,o)=>{let s=this._getTypeForDisplay(o.type,o.typeKeywords);return e.indexOf(s)<0&&(e.push(s),i.push(this._getAccordionItem(o))),i},[]);return l`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(o=>this._getTypeForDisplay(o.type,o.typeKeywords)===t);return l`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return l`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action";return l`<calcite-list-item id=${e.id??c} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this.itemRelationshipDependencies.length>0&&this.itemRelationshipDependencies.some(o=>o===e.id)&&this.reuseWarning&&this._getReuseWarningChip()||""}${t&&i?l`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),o=this._getTypeForSort(t),s=this._sortOrder.indexOf(i),m=this._sortOrder.indexOf(o);return s-m})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let o=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=o&&s?"Table (hosted, view)":s?"Table (hosted)":o?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getReuseWarningChip(){return l`<calcite-chip icon=information kind=neutral .label=${this.reuseWarning} scale=s slot=actions-end>${this.reuseWarning}</calcite-chip>`}};p("solution-item-accordion",a);export{a};
2
+ import{a as h}from"./DV233ITZ.js";import{b as p}from"./EIQZRLWQ.js";import{H as d,h as r,i as l,l as c,r as n}from"./46DQNAMV.js";var y=r`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,a=class extends d{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this._sortedTemplateInfos=[],this._translations=h({name:"solution-item-accordion",blocking:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=n(),this.solutionItemSelect=n(),this.solutionTypeHover=n()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,_sortedTemplateInfos:16,_translations:16}}static{this.styles=y}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(e=>{e.selected&&(e.selected=!1),(e.parentElement?.parentElement).expanded&&((e.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates()}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,o)=>{let s=this._getTypeForDisplay(o.type,o.typeKeywords);return e.indexOf(s)<0&&(e.push(s),i.push(this._getAccordionItem(o))),i},[]);return l`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(o=>this._getTypeForDisplay(o.type,o.typeKeywords)===t);return l`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return l`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action";return l`<calcite-list-item id=${e.id??c} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${this.itemRelationshipDependencies.length>0&&this.itemRelationshipDependencies.some(o=>o===e.id)&&this.reuseWarning&&this._getReuseWarningChip()||""}${t&&i?l`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),o=this._getTypeForSort(t),s=this._sortOrder.indexOf(i),m=this._sortOrder.indexOf(o);return s-m})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let o=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=o&&s?"Table (hosted, view)":s?"Table (hosted)":o?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getReuseWarningChip(){return l`<calcite-chip icon=information kind=neutral .label=${this.reuseWarning} scale=s slot=actions-end>${this.reuseWarning}</calcite-chip>`}};p("solution-item-accordion",a);export{a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./O24ZIQLV.js";import{ta as i}from"./JE7L7M3J.js";export default $arcgis.t(([{u:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
2
+ import a from"./5QSIKX2L.js";import{ta as i}from"./JE7L7M3J.js";export default $arcgis.t(([{u:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./O24ZIQLV.js";import{b as r}from"./PZ4L77M5.js";import{a as b}from"./M5MQY5WC.js";import{b as g}from"./HW7HHHMK.js";import{F as o,G as s,H as p,K as u,h as d,i,j as h,r as l}from"./46DQNAMV.js";export default $arcgis.t(([{a:v,b:f,t:m}])=>{var x=d`calcite-shell-panel{z-index:var(--calcite-z-index-1)}.display-flex{display:flex}.flex-1,.flex-grow{flex:1}.flex-shrink-0{flex:0 0 auto}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.text-center{text-align:center}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: var(--calcite-spacing-none);--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none);font-weight:var(--calcite-font-weight-medium)}.header-content-wrapper{padding-inline-start:var(--calcite-spacing-xxs)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-lg)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.justify-content-start{justify-content:start}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-2{z-index:2}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.position-relative{position:relative}.height-100{height:100%}.height-50{height:50px}.sign-in-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%}.sign-in-icon{transform:translate(-20px)}.height-150{height:150px}.width-150{width:150px}.padding-top-8{padding-top:8px}`,c=class extends p{constructor(){super(),this.solutionsCount=0,this.filterOpen=!0,this.isMobile=!1,this._showAlertFailed=!1,this._translations=b({name:"solutions-deployed-shell",blocking:!0}),this._configContextConsumer=r({context:f,subscribe:!0}),this._deployedCardFetchFailedMessage="",this._deployedCardFetchFailedTitle="",this._isMobileContextConsumer=r({context:v,subscribe:!0,callback:e=>this.isMobile=e}),this._solutionsDeployedPanelRef=o(),this._mainPanelRef=o(),this._panelFixed=!1,this.filterRemoved=l(),this.tokenRefreshed=l(),this._handleSignIn=()=>{let e=window.location.pathname.endsWith("deployments")?"":"deployments";this._configContextConsumer.value?.authentication?.signIn(e)},this.listenOn(window,"deployedCardFetchFailed",e=>{let t=e.detail;this._deployedCardFetchFailedTitle=t.title,this._deployedCardFetchFailedMessage=t.message,this._showAlertFailed=!0})}static{this.properties={solutionsCount:9,filterOpen:16,isMobile:16,_showAlertFailed:16,_translations:16}}static{this.styles=x}willUpdate(e){e.has("isMobile")&&(this.filterOpen=!this.isMobile)}async searchSolutions(e){this._solutionsDeployedPanelRef.value?.setSearchOptions(e),("sortType"in e||"searchTerm"in e)&&this._solutionsDeployedPanelRef.value?.searchSolutions(e)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let n=a.target;n.classList.contains("content-wrapper")&&n.tabIndex===0&&(n.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){if(!this._configContextConsumer.value?.authentication?.IsSignedIn)return this._getSignInPrompt();let e=this.isMobile?"justify-content-start":"";return i`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${s(this._mainPanelRef)}><div class=${`display-flex align-items-center height-50 header-content-wrapper ${e}`} slot=header-content><calcite-label class="label-override flex-shrink-0 padding-top-8" layout=inline>${this._translations.numberOfDeployments?.replace("{{count}}",this.solutionsCount.toString())}</calcite-label></div>${this._getSolutionsDeployedPanel()}</calcite-panel></calcite-shell>`}_getSignInPrompt(){return i`<div class="sign-in-prompt">${this._getSignInIcon()}<div class="text-center leader-1 warning-text trailer-1">${this._translations.signInMessage}</div><calcite-button appearance=outline @click=${this._handleSignIn} @keydown=${e=>m(e,()=>this._handleSignIn())} scale=l>${this._translations.signIn}</calcite-button></div>`}_getSolutionsDeployedPanel(){let e=this.isMobile&&this.filterOpen?{display:"none"}:"";return i`<div><solutions-deployed-panel @deployedCardsFetched=${this._updateSolutionCount} style=${u(e)} ${s(this._solutionsDeployedPanelRef)}></solutions-deployed-panel><calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._deployedCardFetchFailedTitle} @calciteAlertClose=${()=>{this._showAlertFailed=!1}} .open=${this._showAlertFailed}><div slot=title>${this._deployedCardFetchFailedTitle}</div><div slot=message>${this._deployedCardFetchFailedMessage}</div></calcite-alert></div>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_getSignInIcon(){return i`<div class="sign-in-icon"><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg>${h`<path d="M56.9 4.1V60h-.8V4.9H23.3l25.6 7.47v39.26l-28.8 8.4V35h.8v23.97l27.2-7.94V12.97L20.9 5.03V30h-.8V4.1h36.8zM30.735 41.7l.565.566 9.766-9.766-9.766-9.766-.565.567 8.799 8.799H5v.8h34.534l-8.8 8.8z" fill=var(--calcite-color-text-3) />`}</svg></div>`}};g("solutions-deployed-shell",c);return c},a)
2
+ import a from"./5QSIKX2L.js";import{b as r}from"./PZ4L77M5.js";import{a as b}from"./DV233ITZ.js";import{b as g}from"./EIQZRLWQ.js";import{F as o,G as s,H as p,K as u,h as d,i,j as h,r as l}from"./46DQNAMV.js";export default $arcgis.t(([{a:v,b:f,t:m}])=>{var x=d`calcite-shell-panel{z-index:var(--calcite-z-index-1)}.display-flex{display:flex}.flex-1,.flex-grow{flex:1}.flex-shrink-0{flex:0 0 auto}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.text-center{text-align:center}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: var(--calcite-spacing-none);--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none);font-weight:var(--calcite-font-weight-medium)}.header-content-wrapper{padding-inline-start:var(--calcite-spacing-xxs)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-lg)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.justify-content-start{justify-content:start}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-2{z-index:2}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.position-relative{position:relative}.height-100{height:100%}.height-50{height:50px}.sign-in-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%}.sign-in-icon{transform:translate(-20px)}.height-150{height:150px}.width-150{width:150px}.padding-top-8{padding-top:8px}`,c=class extends p{constructor(){super(),this.solutionsCount=0,this.filterOpen=!0,this.isMobile=!1,this._showAlertFailed=!1,this._translations=b({name:"solutions-deployed-shell",blocking:!0}),this._configContextConsumer=r({context:f,subscribe:!0}),this._deployedCardFetchFailedMessage="",this._deployedCardFetchFailedTitle="",this._isMobileContextConsumer=r({context:v,subscribe:!0,callback:e=>this.isMobile=e}),this._solutionsDeployedPanelRef=o(),this._mainPanelRef=o(),this._panelFixed=!1,this.filterRemoved=l(),this.tokenRefreshed=l(),this._handleSignIn=()=>{let e=window.location.pathname.endsWith("deployments")?"":"deployments";this._configContextConsumer.value?.authentication?.signIn(e)},this.listenOn(window,"deployedCardFetchFailed",e=>{let t=e.detail;this._deployedCardFetchFailedTitle=t.title,this._deployedCardFetchFailedMessage=t.message,this._showAlertFailed=!0})}static{this.properties={solutionsCount:9,filterOpen:16,isMobile:16,_showAlertFailed:16,_translations:16}}static{this.styles=x}willUpdate(e){e.has("isMobile")&&(this.filterOpen=!this.isMobile)}async searchSolutions(e){this._solutionsDeployedPanelRef.value?.setSearchOptions(e),("sortType"in e||"searchTerm"in e)&&this._solutionsDeployedPanelRef.value?.searchSolutions(e)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let n=a.target;n.classList.contains("content-wrapper")&&n.tabIndex===0&&(n.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){if(!this._configContextConsumer.value?.authentication?.IsSignedIn)return this._getSignInPrompt();let e=this.isMobile?"justify-content-start":"";return i`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${s(this._mainPanelRef)}><div class=${`display-flex align-items-center height-50 header-content-wrapper ${e}`} slot=header-content><calcite-label class="label-override flex-shrink-0 padding-top-8" layout=inline>${this._translations.numberOfDeployments?.replace("{{count}}",this.solutionsCount.toString())}</calcite-label></div>${this._getSolutionsDeployedPanel()}</calcite-panel></calcite-shell>`}_getSignInPrompt(){return i`<div class="sign-in-prompt">${this._getSignInIcon()}<div class="text-center leader-1 warning-text trailer-1">${this._translations.signInMessage}</div><calcite-button appearance=outline @click=${this._handleSignIn} @keydown=${e=>m(e,()=>this._handleSignIn())} scale=l>${this._translations.signIn}</calcite-button></div>`}_getSolutionsDeployedPanel(){let e=this.isMobile&&this.filterOpen?{display:"none"}:"";return i`<div><solutions-deployed-panel @deployedCardsFetched=${this._updateSolutionCount} style=${u(e)} ${s(this._solutionsDeployedPanelRef)}></solutions-deployed-panel><calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._deployedCardFetchFailedTitle} @calciteAlertClose=${()=>{this._showAlertFailed=!1}} .open=${this._showAlertFailed}><div slot=title>${this._deployedCardFetchFailedTitle}</div><div slot=message>${this._deployedCardFetchFailedMessage}</div></calcite-alert></div>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_getSignInIcon(){return i`<div class="sign-in-icon"><svg viewBox="0 0 64 64" width=200 height=200 xmlns=http://www.w3.org/2000/svg>${h`<path d="M56.9 4.1V60h-.8V4.9H23.3l25.6 7.47v39.26l-28.8 8.4V35h.8v23.97l27.2-7.94V12.97L20.9 5.03V30h-.8V4.1h36.8zM30.735 41.7l.565.566 9.766-9.766-9.766-9.766-.565.567 8.799 8.799H5v.8h34.534l-8.8 8.8z" fill=var(--calcite-color-text-3) />`}</svg></div>`}};g("solutions-deployed-shell",c);return c},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as y}from"./6MZ227J7.js";import d from"./O24ZIQLV.js";import{b as c}from"./PZ4L77M5.js";import{a as b}from"./M5MQY5WC.js";import{b as m}from"./HW7HHHMK.js";import{F as r,G as a,H as _,J as o,K as n,h as f,i as s,r as g}from"./46DQNAMV.js";export default $arcgis.t(([{D:h,E:d,K:p,a:v,b:x}])=>{var w=f`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@media(max-width:800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-3);--calcite-panel-background-color: var(--calcite-color-foreground-3)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@media(max-width:800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,u=class extends _{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=b({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=r(),this._solutionsFilterPanelRef=r(),this._mainPanelRef=r(),this._panelFixed=!1,this._configContextConsumer=c({context:x,subscribe:!0}),this._isMobileContextConsumer=c({context:v,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=g(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=w}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let t=e.industry?Object.entries(h).find(([,l])=>l===e.industry)?.[0]:void 0,i=e.domain?Object.entries(d).find(([,l])=>l===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let l=i.target;l.classList.contains("content-wrapper")&&l.tabIndex===0&&(l.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return s`<calcite-shell class=${`position-relative ${t}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${a(this._mainPanelRef)}><div class=${o(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&s`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{this._filters={...this._filters,categories:[]},this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?s`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${n(e)}><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${a(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:s`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${n(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${a(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return s`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${n(e)} ${a(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(t=>t.type==="industry"||t.type==="domain");if(e.length!==0)return s`<calcite-chip-group class="chip-group" label>${y(e,t=>`${t.type}:${t.value}`,t=>s`<calcite-chip appearance=outline-fill class=${o(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_chipClosed(e,t){if(this._filters.categories){if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(l=>l.displayValue!==e&&l.type!==t);this._filters.categories=i}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let t=[h[e.industry]];if(e.domain){let i=d[e.domain];t.push(i)}this._telemetry?.logEvent({category:p.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let l=e[e.length-1];l&&this._logFilterTelemetry(l)}if("searchTerm"in i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:p.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};m("solutions-all-shell",u);return u},d)
2
+ import{a as y}from"./6MZ227J7.js";import d from"./5QSIKX2L.js";import{b as c}from"./PZ4L77M5.js";import{a as b}from"./DV233ITZ.js";import{b as m}from"./EIQZRLWQ.js";import{F as r,G as a,H as _,J as o,K as n,h as f,i as s,r as g}from"./46DQNAMV.js";export default $arcgis.t(([{D:h,E:d,K:p,a:v,b:x}])=>{var w=f`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-foreground-2)}.panel-override{--calcite-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@media(max-width:800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-3);--calcite-panel-background-color: var(--calcite-color-foreground-3)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@media(max-width:800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,u=class extends _{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=b({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=r(),this._solutionsFilterPanelRef=r(),this._mainPanelRef=r(),this._panelFixed=!1,this._configContextConsumer=c({context:x,subscribe:!0}),this._isMobileContextConsumer=c({context:v,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=g(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=w}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let t=e.industry?Object.entries(h).find(([,l])=>l===e.industry)?.[0]:void 0,i=e.domain?Object.entries(d).find(([,l])=>l===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let l=i.target;l.classList.contains("content-wrapper")&&l.tabIndex===0&&(l.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return s`<calcite-shell class=${`position-relative ${t}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${a(this._mainPanelRef)}><div class=${o(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&s`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{this._filters={...this._filters,categories:[]},this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?s`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${n(e)}><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${a(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:s`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${n(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${a(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return s`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${n(e)} ${a(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(t=>t.type==="industry"||t.type==="domain");if(e.length!==0)return s`<calcite-chip-group class="chip-group" label>${y(e,t=>`${t.type}:${t.value}`,t=>s`<calcite-chip appearance=outline-fill class=${o(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_chipClosed(e,t){if(this._filters.categories){if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(l=>l.displayValue!==e&&l.type!==t);this._filters.categories=i}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let t=[h[e.industry]];if(e.domain){let i=d[e.domain];t.push(i)}this._telemetry?.logEvent({category:p.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let l=e[e.length-1];l&&this._logFilterTelemetry(l)}if("searchTerm"in i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:p.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};m("solutions-all-shell",u);return u},d)