@esri/solutions-components 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/cdn/{PNBTKFO6.js → 254AARKL.js} +1 -1
  2. package/dist/cdn/{VYTGCKEU.js → 2OL2CMZE.js} +1 -1
  3. package/dist/cdn/{5UEEUPL5.js → 3H5S6KGV.js} +1 -1
  4. package/dist/cdn/{XFEOA56B.js → 3NTCGBPK.js} +1 -1
  5. package/dist/cdn/{ASSNR5JI.js → 3QMNW3AL.js} +1 -1
  6. package/dist/cdn/{4CMHNL7Z.js → 3X5E5PEB.js} +1 -1
  7. package/dist/cdn/{TUGGGATS.js → 46N6WE5W.js} +1 -1
  8. package/dist/cdn/{W53A2CNH.js → 47EMI5L2.js} +1 -1
  9. package/dist/cdn/{RDWJHF5P.js → 4H3LGV2O.js} +1 -1
  10. package/dist/cdn/{2642PFUF.js → 4TZGWL7D.js} +1 -1
  11. package/dist/cdn/{FL74XITX.js → 5H3T3ZTG.js} +1 -1
  12. package/dist/cdn/{MMZXFDQZ.js → 632Z67I5.js} +1 -1
  13. package/dist/cdn/{BGO3JXY3.js → 65I7NFWN.js} +1 -1
  14. package/dist/cdn/{WZZG5H7Q.js → 6GMSPYN2.js} +1 -1
  15. package/dist/cdn/{LFIJXE3U.js → 6LLQFZGG.js} +1 -1
  16. package/dist/cdn/{Y4YYE2LG.js → 7G7GTCD2.js} +1 -1
  17. package/dist/cdn/{HAAFUV3J.js → 7QOFBIFO.js} +1 -1
  18. package/dist/cdn/{54WM76XB.js → A25PBMLE.js} +1 -1
  19. package/dist/cdn/{FUUWSZIZ.js → B5ARN6DC.js} +1 -1
  20. package/dist/cdn/{ZQJ2QLO5.js → B7LNGJY2.js} +1 -1
  21. package/dist/cdn/{CK7LURBK.js → BAVJY3AH.js} +1 -1
  22. package/dist/cdn/{YQECYE4M.js → BVBWBQGA.js} +1 -1
  23. package/dist/cdn/{FZ4NFB5R.js → DIG42YV7.js} +1 -1
  24. package/dist/cdn/{D2QNPQWY.js → E5GLDSJZ.js} +1 -1
  25. package/dist/cdn/{E4L5GTBZ.js → EG4OLFS7.js} +1 -1
  26. package/dist/cdn/F7CBQCHQ.js +2 -0
  27. package/dist/cdn/{LGUC7DRT.js → F7KPKXY6.js} +1 -1
  28. package/dist/cdn/{GJJOB4RR.js → FRM6WUOB.js} +1 -1
  29. package/dist/cdn/{USIESVTZ.js → GHL7S2IO.js} +1 -1
  30. package/dist/cdn/{M7OEPT52.js → GVHIJ3IB.js} +1 -1
  31. package/dist/cdn/{QXLM22NS.js → H2ZDTZJM.js} +1 -1
  32. package/dist/cdn/{HNRZHAOD.js → HLTPPQD5.js} +1 -1
  33. package/dist/cdn/{3M6AYSM7.js → IJBEMLYV.js} +1 -1
  34. package/dist/cdn/{VCH6XDEH.js → IKK4EKF4.js} +1 -1
  35. package/dist/cdn/{U75PDOJF.js → JMOT5FWT.js} +1 -1
  36. package/dist/cdn/{JHOXJY5O.js → JO4WX767.js} +1 -1
  37. package/dist/cdn/{C43NWBRR.js → KB2TRJ24.js} +1 -1
  38. package/dist/cdn/LI7AOAAS.js +2 -0
  39. package/dist/cdn/{4OZQG5MW.js → LT26PSOA.js} +1 -1
  40. package/dist/cdn/{OLDYKR5E.js → LYVD54Z4.js} +1 -1
  41. package/dist/cdn/{WDFQGUHD.js → MJM54ITG.js} +1 -1
  42. package/dist/cdn/{2J6ZHQEF.js → MKJGHHQA.js} +1 -1
  43. package/dist/cdn/{BHHQFUCH.js → MOQP5E5H.js} +1 -1
  44. package/dist/cdn/{N5YBX6NM.js → MQ3VVC37.js} +1 -1
  45. package/dist/cdn/{BFHVGXZN.js → O5B2N6WR.js} +1 -1
  46. package/dist/cdn/{DZUVI4S3.js → OELPVFFA.js} +1 -1
  47. package/dist/cdn/OWIJJGEY.js +2 -0
  48. package/dist/cdn/{B5SYTUTT.js → PHNGM56J.js} +1 -1
  49. package/dist/cdn/{ZYTKA3NP.js → PTCD4PWF.js} +1 -1
  50. package/dist/cdn/{5VP4DXWE.js → PUFV6POH.js} +1 -1
  51. package/dist/cdn/{KVR3XE7B.js → PXZF4QLN.js} +1 -1
  52. package/dist/cdn/{LQ3CLDU5.js → Q364IAYO.js} +1 -1
  53. package/dist/cdn/{ZRCMN3AQ.js → Q5CDQ25L.js} +1 -1
  54. package/dist/cdn/{UDTF5SYU.js → QDQVOSEM.js} +1 -1
  55. package/dist/cdn/{VDDTJAF2.js → QFQS5CRA.js} +1 -1
  56. package/dist/cdn/{N7RLYKQG.js → QKSDEEHH.js} +1 -1
  57. package/dist/cdn/{UR6OMPID.js → QO5AMX4U.js} +1 -1
  58. package/dist/cdn/{RTSKNY33.js → QRPBAR4V.js} +1 -1
  59. package/dist/cdn/{LTBO6VJF.js → RNEXKDUX.js} +1 -1
  60. package/dist/cdn/{BVWFZPY7.js → S23N6TCC.js} +1 -1
  61. package/dist/cdn/{6E6CKB2R.js → SHZO2XLE.js} +1 -1
  62. package/dist/cdn/{TAXUQXTN.js → SJEXGZK4.js} +1 -1
  63. package/dist/cdn/{5Z32YRHM.js → SVAPYMHV.js} +1 -1
  64. package/dist/cdn/{HLPUNGB5.js → TH6ZKLKN.js} +1 -1
  65. package/dist/cdn/{KKI72ISR.js → TZR3I4ZP.js} +1 -1
  66. package/dist/cdn/{AJRYDDC7.js → U2XTDZYY.js} +1 -1
  67. package/dist/cdn/{XUFPQNGT.js → UDOITPWM.js} +1 -1
  68. package/dist/cdn/{QKGOQ7EC.js → URNDQQPI.js} +1 -1
  69. package/dist/cdn/{UDPPJCXC.js → UW42HUTN.js} +1 -1
  70. package/dist/cdn/{JN4HYWSX.js → VNMG3E5D.js} +1 -1
  71. package/dist/cdn/{QJ4MQK3Y.js → VPNO4RA7.js} +1 -1
  72. package/dist/cdn/{Y3FTYVXY.js → WEWRDXGB.js} +1 -1
  73. package/dist/cdn/{NQF577F4.js → WUNWHJR5.js} +1 -1
  74. package/dist/cdn/{6EFUV7CH.js → WZGZCVBE.js} +1 -1
  75. package/dist/cdn/{6LPOLFT7.js → XWZ2LVEA.js} +1 -1
  76. package/dist/cdn/{V65IKENN.js → Y3CSVJBO.js} +1 -1
  77. package/dist/cdn/{KSKNVJAL.js → Y7H6OFT6.js} +1 -1
  78. package/dist/cdn/{55CA3AGN.js → YCKE3G3V.js} +1 -1
  79. package/dist/cdn/Z6D47FMI.js +2 -0
  80. package/dist/cdn/{NQXUGAR7.js → ZEFTAU6G.js} +1 -1
  81. package/dist/cdn/{BNQ63VOG.js → ZTRDNR6L.js} +1 -1
  82. package/dist/cdn/{JIPE2UQ3.js → ZV6LDJIX.js} +1 -1
  83. package/dist/cdn/{TBJLV2A3.js → ZWFXFJN5.js} +1 -1
  84. package/dist/cdn/index.js +1 -1
  85. package/dist/chunks/runtime.js +2 -2
  86. package/dist/components/solution-details-panel/customElement.js +15 -14
  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 +8 -5
  91. package/package.json +1 -1
  92. package/dist/cdn/C2MDLUTX.js +0 -2
  93. package/dist/cdn/NXG2TZQJ.js +0 -2
  94. package/dist/cdn/NZYAEBC7.js +0 -2
  95. package/dist/cdn/VU3OQQKP.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import d from"./RTSKNY33.js";import{b}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as m}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./VU3OQQKP.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"./QRPBAR4V.js";import{b}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import{a as m}from"./6LLQFZGG.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"./LI7AOAAS.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"./4CMHNL7Z.js";import"./6MZ227J7.js";import a from"./RTSKNY33.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import"./VU3OQQKP.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,a])=>{return a},a,b)
2
+ import b from"./3X5E5PEB.js";import"./6MZ227J7.js";import a from"./QRPBAR4V.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import"./6LLQFZGG.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"./LI7AOAAS.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./RTSKNY33.js";import{b as m}from"./PZ4L77M5.js";import{a as g}from"./LFIJXE3U.js";import{b as p}from"./VU3OQQKP.js";import{F as l,G as d,H as h,L as s,h as c,i}from"./46DQNAMV.js";export default $arcgis.t(([,,,{b:u,t:f,z:r}])=>{var b=c`*[tabindex]:focus-visible{outline:solid 2px var(--calcite-color-brand);outline-offset:2px}.display-flex{display:flex}.align-items-center{align-items:center}.justify-content-center{justify-content:center}.screenshot-container{width:100%;overflow:hidden}.footer{width:100%}.footer-override{--calcite-dialog-footer-space: 0px}.footer-card{width:200px;height:100px;cursor:pointer;padding-bottom:2px}.padding-1{padding:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-end-1{padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.padding-top-1{padding-top:1rem}.padding-top-1-2{padding-top:.5rem}.background-black{background-color:var(--calcite-color-foreground-3)}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{outline:2px solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer}.calcite-card-selected{outline:2px solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer}calcite-card:hover .hover-text{opacity:1;color:#fff}.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-lg)}.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}.footer-card img{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;object-fit:contain}`,n=class extends h{constructor(){super(...arguments),this.open=!1,this._screenshots=[],this._translations=g({name:"solution-snapshot-gallery",blocking:!0}),this._configContextConsumer=m({context:u,subscribe:!0}),this._displayText="",this._paginationControl=l(),this._screenshotNames=[]}static{this.properties={card:0,screenshot:0,itemProperties:0,open:5,_screenshots:16,_translations:16}}static{this.styles=b}willUpdate(t){t.has("screenshot")&&this.screenshot&&(this._displayText=this.screenshot.description||this.screenshot.alt),t.has("itemProperties")&&this.itemProperties&&(this._screenshots=this.itemProperties.preview.filter(e=>e.format==="image"),this._screenshotNames=this._screenshots.map(e=>e.name))}render(){return i`<calcite-dialog class="footer-override" .heading=${this.card?.title} modal @calciteDialogClose=${()=>this.open=!1} .open=${this.open} outside-close-disabled width=l>${this._getScreenshotView()}${this._getFooter()}</calcite-dialog>`}_getScreenshotView(){return this.screenshot?i`<div class="display-flex justify-content-center screenshot-container">${this._getImage(this.screenshot)}</div>`:""}_getFooter(){let t=this._screenshotNames.indexOf(this.screenshot?.name||""),e=document.body.classList.contains("calcite-mode-dark")?"calcite-mode-dark":"";return i`<div class="footer" slot=footer><div class=${`display-flex align-items-center padding-start-1 padding-top-1-2 background-black ${e}`}><calcite-label layout=inline><calcite-pagination class="padding-end-1" @calcitePaginationChange=${this._changeScreenshot} page-size=1 start-item=${t+1} total-items=${this._screenshots.length??s} ${d(this._paginationControl)}></calcite-pagination><span tabindex=0>${this._displayText}</span></calcite-label></div>${this._getCards()}</div>`}_changeScreenshot(){this.screenshot=this._screenshots[this._paginationControl.value.startItem-1]}_getCards(){return i`<calcite-card-group class="card-group padding-1" .label=${this._translations.seeSolutionScreenshots} selection-mode=single>${this._screenshots.map(t=>{let e=t.name===this.screenshot?.name;return i`<calcite-card class=${`footer-card ${e?"calcite-card-selected":""}`} .label=${t.alt} @click=${()=>this._showScreenshot(t)} @keydown=${o=>f(o,()=>this._showScreenshot(t))} .selected=${e}><div class="card-image-wrap" slot=thumbnail>${this._getImage(t,"thumbnail")}<div class="hover-text">${this._translations.viewScreenshot}</div></div></calcite-card>`})}</calcite-card-group>`}_getImage(t,e){return i`<img alt=${t.alt??s} slot=${e??s} src=${this._getSource(this._configContextConsumer.value.authentication,this.card?.id||"",t.name)??s}>`}_showScreenshot(t){this.screenshot=t}_getSource(t,e,o){let a=this._configContextConsumer.value;return a.agoBasedEnterpriseSolutionsGroupId&&a.isEnterprise?r(e||"",o,void 0,a.agolPortalUrl):t?r(e||"",o,t):""}};p("solution-snapshot-gallery",n);return n},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",a)
2
+ import a from"./QRPBAR4V.js";import{b as m}from"./PZ4L77M5.js";import{a as g}from"./6LLQFZGG.js";import{b as p}from"./LI7AOAAS.js";import{F as l,G as d,H as h,L as s,h as c,i}from"./46DQNAMV.js";export default $arcgis.t(([,,,{b:u,t:f,z:r}])=>{var b=c`*[tabindex]:focus-visible{outline:solid 2px var(--calcite-color-brand);outline-offset:2px}.display-flex{display:flex}.align-items-center{align-items:center}.justify-content-center{justify-content:center}.screenshot-container{width:100%;overflow:hidden}.footer{width:100%}.footer-override{--calcite-dialog-footer-space: 0px}.footer-card{width:200px;height:100px;cursor:pointer;padding-bottom:2px}.padding-1{padding:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-end-1{padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.padding-top-1{padding-top:1rem}.padding-top-1-2{padding-top:.5rem}.background-black{background-color:var(--calcite-color-foreground-3)}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{outline:2px solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer}.calcite-card-selected{outline:2px solid var(--calcite-color-brand);box-sizing:border-box;cursor:pointer}calcite-card:hover .hover-text{opacity:1;color:#fff}.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-lg)}.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}.footer-card img{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;object-fit:contain}`,n=class extends h{constructor(){super(...arguments),this.open=!1,this._screenshots=[],this._translations=g({name:"solution-snapshot-gallery",blocking:!0}),this._configContextConsumer=m({context:u,subscribe:!0}),this._displayText="",this._paginationControl=l(),this._screenshotNames=[]}static{this.properties={card:0,screenshot:0,itemProperties:0,open:5,_screenshots:16,_translations:16}}static{this.styles=b}willUpdate(t){t.has("screenshot")&&this.screenshot&&(this._displayText=this.screenshot.description||this.screenshot.alt),t.has("itemProperties")&&this.itemProperties&&(this._screenshots=this.itemProperties.preview.filter(e=>e.format==="image"),this._screenshotNames=this._screenshots.map(e=>e.name))}render(){return i`<calcite-dialog class="footer-override" .heading=${this.card?.title} modal @calciteDialogClose=${()=>this.open=!1} .open=${this.open} outside-close-disabled width=l>${this._getScreenshotView()}${this._getFooter()}</calcite-dialog>`}_getScreenshotView(){return this.screenshot?i`<div class="display-flex justify-content-center screenshot-container">${this._getImage(this.screenshot)}</div>`:""}_getFooter(){let t=this._screenshotNames.indexOf(this.screenshot?.name||""),e=document.body.classList.contains("calcite-mode-dark")?"calcite-mode-dark":"";return i`<div class="footer" slot=footer><div class=${`display-flex align-items-center padding-start-1 padding-top-1-2 background-black ${e}`}><calcite-label layout=inline><calcite-pagination class="padding-end-1" @calcitePaginationChange=${this._changeScreenshot} page-size=1 start-item=${t+1} total-items=${this._screenshots.length??s} ${d(this._paginationControl)}></calcite-pagination><span tabindex=0>${this._displayText}</span></calcite-label></div>${this._getCards()}</div>`}_changeScreenshot(){this.screenshot=this._screenshots[this._paginationControl.value.startItem-1]}_getCards(){return i`<calcite-card-group class="card-group padding-1" .label=${this._translations.seeSolutionScreenshots} selection-mode=single>${this._screenshots.map(t=>{let e=t.name===this.screenshot?.name;return i`<calcite-card class=${`footer-card ${e?"calcite-card-selected":""}`} .label=${t.alt} @click=${()=>this._showScreenshot(t)} @keydown=${o=>f(o,()=>this._showScreenshot(t))} .selected=${e}><div class="card-image-wrap" slot=thumbnail>${this._getImage(t,"thumbnail")}<div class="hover-text">${this._translations.viewScreenshot}</div></div></calcite-card>`})}</calcite-card-group>`}_getImage(t,e){return i`<img alt=${t.alt??s} slot=${e??s} src=${this._getSource(this._configContextConsumer.value.authentication,this.card?.id||"",t.name)??s}>`}_showScreenshot(t){this.screenshot=t}_getSource(t,e,o){let a=this._configContextConsumer.value;return a.agoBasedEnterpriseSolutionsGroupId&&a.isEnterprise?r(e||"",o,void 0,a.agolPortalUrl):t?r(e||"",o,t):""}};p("solution-snapshot-gallery",n);return n},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import e from"./KDIUYXBA.js";import b from"./UUYUTETH.js";import{a as u}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as p}from"./VU3OQQKP.js";import{F as c,G as h,H as d,h as l,i as a,r as i,u as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{b:m},{d:b}])=>{var f=l`@layer{:host{display:block!important}.display-none{display:none}.padding-1{padding:1rem}.position-relative{position:relative}.overflow-auto{overflow:auto}.height-full{height:100%}.position-static{position:static!important}.z-index-500{z-index:500!important}card-manager{display:block}}`,r=class extends d{constructor(){super(),this.customInfoText="",this.enableEditGeometry=!1,this.enableSnapping=!1,this.isMobile=!1,this.zoomAndScrollToSelected=!1,this.selectedFeaturesIds=[],this.enableCreateFeatures=!0,this.createBtnLabel="",this.selectingFeatureFromMap=!1,this.showSketchWidgets=!1,this._cardLoading=!1,this._graphics=[],this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._translations=u({name:"card-manager",blocking:!0}),this._isFeatureCreated=!1,this._createFeature=c(),this.createWorkFlowStarted=i(),this.backFromCreateWorkFlow=i(),this.featureOrRecordSubmitted=i(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled)}static{this.properties={customInfoText:1,enableEditGeometry:5,enableSnapping:5,isMobile:5,layerOrTable:0,mapView:0,zoomAndScrollToSelected:5,selectedFeaturesIds:0,enableCreateFeatures:5,createBtnLabel:1,selectingFeatureFromMap:5,showSketchWidgets:5,_cardLoading:16,_graphics:16,_showCreateFeatureComponent:16,_showSubmitBtn:16,_translations:16}}static{this.styles=f}static{this.shadowRootOptions=n}async featureSelectionChange(e){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();let t=e.detail;this._graphics=await this._getFeaturesByIds(t)}async layerSelectionChange(e){this._showCreateFeatureComponent&&this._backFromCreateFeature();let t=e.detail[0];this.layerOrTable=this.mapView?await b(this.mapView,t):void 0}async relatedRecordToggled(e){let t=e.detail;this.layerOrTable=t}async load(){this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){let e=this._graphics?.length>0?"":"display-none",t=this._graphics?.length===0&&this._showCreateFeatureComponent?"":"display-none",s=this._graphics?.length>0||this._showCreateFeatureComponent?"display-none":"",g=this.layerOrTable?.isTable,F=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,w=this.enableCreateFeatures&&this.layerOrTable?.capabilities?.operations?.supportsAdd,o=this.createBtnLabel?this.createBtnLabel:g?this._translations.createRecord:this._translations.createFeature,_=!this.layerOrTable,C=this.enableSnapping&&!this.layerOrTable?.isTable;return a`<div class="overflow-auto height-full"><calcite-shell class=${`position-relative ${e}`}><div class="position-static z-index-500 height-full"><info-card .allowEditing=${this.layerOrTable?.editingEnabled} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${C} .graphics=${this._graphics} .isLoading=${this._cardLoading} .isMobile=${this.isMobile} .mapView=${this.mapView} position=relative show-close-btn></info-card></div></calcite-shell><calcite-shell class=${`position-relative ${s}`}><calcite-panel><div class=padding-1><calcite-notice .icon=${this.selectingFeatureFromMap?"map":"table"} icon-flip-rtl open><div slot=message>${F}</div></calcite-notice></div>${!this.isMobile&&w&&a`<calcite-button .disabled=${_} @click=${()=>this._createFeatureBtnClicked()} slot=footer width=full>${o}</calcite-button>`||""}</calcite-panel></calcite-shell><calcite-shell class=${`position-relative ${t}`}><calcite-flow-item selected><calcite-panel .heading=${o}><calcite-action appearance=solid class="back-button hydrated" icon=chevron-left @click=${this._backFromCreateFeature} scale=s slot=header-actions-start text></calcite-action>${this.getEditorComponent()}${this._showSubmitBtn&&a`<calcite-button appearance=solid class="footer-top-button footer-button" @click=${()=>this._createFeature.value&&void this._createFeature.value.submit()} slot=footer width=full>${this._translations.create}</calcite-button>`||""}</calcite-panel></calcite-flow-item></calcite-shell></div>`}getEditorComponent(){let e=this.enableSnapping&&!this.layerOrTable?.isTable&&this.enableCreateFeatures;return a`<div>${this._showCreateFeatureComponent&&a`<create-feature customize-submit .enableSnapping=${e} .mapView=${this.mapView} .isMobile=${this.isMobile} @drawComplete=${()=>{this._showSubmitBtn=!0}} @editingAttachment=${t=>{this._showSubmitBtn=!t.detail}} @progressStatus=${()=>{setTimeout(()=>{this._isFeatureCreated=!1},2e3)}} @success=${this._featureCreated} .showSketchWidgets=${this.showSketchWidgets} .selectedLayerId=${this.layerOrTable?.id} .showLayerVisibilityMsg=${this.layerOrTable?.visible===!1} ${h(this._createFeature)}></create-feature>`||""}</div>`}async _getFeaturesByIds(e){return(e.length>0&&this.layerOrTable&&this.mapView?await m(e,this.layerOrTable,[],!0,this.mapView?.spatialReference):[]).sort((t,s)=>e.indexOf(Number(t.getObjectId()))-e.indexOf(Number(s.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature.value&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit(),setTimeout(()=>{this._showCreateFeatureComponent=!0},50)}};p("card-manager",r);return r},b,e)
2
+ import e from"./KDIUYXBA.js";import b from"./UUYUTETH.js";import{a as u}from"./6LLQFZGG.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as p}from"./LI7AOAAS.js";import{F as c,G as h,H as d,h as l,i as a,r as i,u as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([{b:m},{d:b}])=>{var f=l`@layer{:host{display:block!important}.display-none{display:none}.padding-1{padding:1rem}.position-relative{position:relative}.overflow-auto{overflow:auto}.height-full{height:100%}.position-static{position:static!important}.z-index-500{z-index:500!important}card-manager{display:block}}`,r=class extends d{constructor(){super(),this.customInfoText="",this.enableEditGeometry=!1,this.enableSnapping=!1,this.isMobile=!1,this.zoomAndScrollToSelected=!1,this.selectedFeaturesIds=[],this.enableCreateFeatures=!0,this.createBtnLabel="",this.selectingFeatureFromMap=!1,this.showSketchWidgets=!1,this._cardLoading=!1,this._graphics=[],this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._translations=u({name:"card-manager",blocking:!0}),this._isFeatureCreated=!1,this._createFeature=c(),this.createWorkFlowStarted=i(),this.backFromCreateWorkFlow=i(),this.featureOrRecordSubmitted=i(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled)}static{this.properties={customInfoText:1,enableEditGeometry:5,enableSnapping:5,isMobile:5,layerOrTable:0,mapView:0,zoomAndScrollToSelected:5,selectedFeaturesIds:0,enableCreateFeatures:5,createBtnLabel:1,selectingFeatureFromMap:5,showSketchWidgets:5,_cardLoading:16,_graphics:16,_showCreateFeatureComponent:16,_showSubmitBtn:16,_translations:16}}static{this.styles=f}static{this.shadowRootOptions=n}async featureSelectionChange(e){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();let t=e.detail;this._graphics=await this._getFeaturesByIds(t)}async layerSelectionChange(e){this._showCreateFeatureComponent&&this._backFromCreateFeature();let t=e.detail[0];this.layerOrTable=this.mapView?await b(this.mapView,t):void 0}async relatedRecordToggled(e){let t=e.detail;this.layerOrTable=t}async load(){this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){let e=this._graphics?.length>0?"":"display-none",t=this._graphics?.length===0&&this._showCreateFeatureComponent?"":"display-none",s=this._graphics?.length>0||this._showCreateFeatureComponent?"display-none":"",g=this.layerOrTable?.isTable,F=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,w=this.enableCreateFeatures&&this.layerOrTable?.capabilities?.operations?.supportsAdd,o=this.createBtnLabel?this.createBtnLabel:g?this._translations.createRecord:this._translations.createFeature,_=!this.layerOrTable,C=this.enableSnapping&&!this.layerOrTable?.isTable;return a`<div class="overflow-auto height-full"><calcite-shell class=${`position-relative ${e}`}><div class="position-static z-index-500 height-full"><info-card .allowEditing=${this.layerOrTable?.editingEnabled} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${C} .graphics=${this._graphics} .isLoading=${this._cardLoading} .isMobile=${this.isMobile} .mapView=${this.mapView} position=relative show-close-btn></info-card></div></calcite-shell><calcite-shell class=${`position-relative ${s}`}><calcite-panel><div class=padding-1><calcite-notice .icon=${this.selectingFeatureFromMap?"map":"table"} icon-flip-rtl open><div slot=message>${F}</div></calcite-notice></div>${!this.isMobile&&w&&a`<calcite-button .disabled=${_} @click=${()=>this._createFeatureBtnClicked()} slot=footer width=full>${o}</calcite-button>`||""}</calcite-panel></calcite-shell><calcite-shell class=${`position-relative ${t}`}><calcite-flow-item selected><calcite-panel .heading=${o}><calcite-action appearance=solid class="back-button hydrated" icon=chevron-left @click=${this._backFromCreateFeature} scale=s slot=header-actions-start text></calcite-action>${this.getEditorComponent()}${this._showSubmitBtn&&a`<calcite-button appearance=solid class="footer-top-button footer-button" @click=${()=>this._createFeature.value&&void this._createFeature.value.submit()} slot=footer width=full>${this._translations.create}</calcite-button>`||""}</calcite-panel></calcite-flow-item></calcite-shell></div>`}getEditorComponent(){let e=this.enableSnapping&&!this.layerOrTable?.isTable&&this.enableCreateFeatures;return a`<div>${this._showCreateFeatureComponent&&a`<create-feature customize-submit .enableSnapping=${e} .mapView=${this.mapView} .isMobile=${this.isMobile} @drawComplete=${()=>{this._showSubmitBtn=!0}} @editingAttachment=${t=>{this._showSubmitBtn=!t.detail}} @progressStatus=${()=>{setTimeout(()=>{this._isFeatureCreated=!1},2e3)}} @success=${this._featureCreated} .showSketchWidgets=${this.showSketchWidgets} .selectedLayerId=${this.layerOrTable?.id} .showLayerVisibilityMsg=${this.layerOrTable?.visible===!1} ${h(this._createFeature)}></create-feature>`||""}</div>`}async _getFeaturesByIds(e){return(e.length>0&&this.layerOrTable&&this.mapView?await m(e,this.layerOrTable,[],!0,this.mapView?.spatialReference):[]).sort((t,s)=>e.indexOf(Number(t.getObjectId()))-e.indexOf(Number(s.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature.value&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit(),setTimeout(()=>{this._showCreateFeatureComponent=!0},50)}};p("card-manager",r);return r},b,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as c}from"./VU3OQQKP.js";import{F as l,G as n,H as r,h as s,i,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([h,d])=>{var m=s`:host{display:block}`,t=class extends r{constructor(){super(...arguments),this._fullscreenElement=l(),this.fullscreenStateChange=a()}static{this.properties={mapView:0,fullscreenWidget:0}}static{this.styles=m}willUpdate(e){e.has("mapView")&&this.mapViewWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this._initFullscreenWidget()})}render(){return i`<div class="fullscreen-widget" ${n(this._fullscreenElement)}></div>`}async updated(){this.hasUpdated||await this._initFullscreenWidget()}async loaded(){await this._initFullscreenWidget()}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement.value&&!this.fullscreenWidget?(this.fullscreenWidget=new h({view:this.mapView}),await this.fullscreenWidget?.when(()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=d?.watch(()=>this.fullscreenWidget?.viewModel.state,e=>e&&this.fullscreenStateChange.emit(e))})):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}};c("map-fullscreen",t);return t},"widgets/Fullscreen","core/reactiveUtils")
2
+ import{b as c}from"./LI7AOAAS.js";import{F as l,G as n,H as r,h as s,i,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([h,d])=>{var m=s`:host{display:block}`,t=class extends r{constructor(){super(...arguments),this._fullscreenElement=l(),this.fullscreenStateChange=a()}static{this.properties={mapView:0,fullscreenWidget:0}}static{this.styles=m}willUpdate(e){e.has("mapView")&&this.mapViewWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this._initFullscreenWidget()})}render(){return i`<div class="fullscreen-widget" ${n(this._fullscreenElement)}></div>`}async updated(){this.hasUpdated||await this._initFullscreenWidget()}async loaded(){await this._initFullscreenWidget()}async _initFullscreenWidget(){this.mapView&&this._fullscreenElement.value&&!this.fullscreenWidget?(this.fullscreenWidget=new h({view:this.mapView}),await this.fullscreenWidget?.when(()=>{this._fullscreenStateChangeHandle&&this._fullscreenStateChangeHandle.remove(),this._fullscreenStateChangeHandle=d?.watch(()=>this.fullscreenWidget?.viewModel.state,e=>e&&this.fullscreenStateChange.emit(e))})):this.fullscreenWidget&&(this.fullscreenWidget.view=this.mapView)}};c("map-fullscreen",t);return t},"widgets/Fullscreen","core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as r}from"./VU3OQQKP.js";import{H as c,h as e,i as s,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([l])=>{var n=e`:host{display:block}`,i=class extends c{constructor(){super(...arguments),this.visibilityIcon="eyeball",this.fullscreenStateChange=a()}static{this.properties={mapView:0,layerListWidget:0,visibilityIcon:1}}static{this.styles=n}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("visibilityIcon")&&this.visibilityIconWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this._initLayerListWidget()})}async visibilityIconWatchHandler(){this.layerListWidget&&(this.layerListWidget.visibilityAppearance=this.visibilityIcon==="checkbox"?"checkbox":"default")}render(){return s`<div class="layer-list-widget"></div>`}async updated(){this.hasUpdated||await this._initLayerListWidget()}async loaded(){await this._initLayerListWidget()}async _initLayerListWidget(){this.mapView&&(this.layerListWidget=new l({view:this.mapView,visibilityAppearance:this.visibilityIcon==="checkbox"?"checkbox":"default"}))}};r("layer-list-widget",i);return i},"widgets/LayerList")
2
+ import{b as r}from"./LI7AOAAS.js";import{H as c,h as e,i as s,r as a}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([l])=>{var n=e`:host{display:block}`,i=class extends c{constructor(){super(...arguments),this.visibilityIcon="eyeball",this.fullscreenStateChange=a()}static{this.properties={mapView:0,layerListWidget:0,visibilityIcon:1}}static{this.styles=n}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("visibilityIcon")&&this.visibilityIconWatchHandler()}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this._initLayerListWidget()})}async visibilityIconWatchHandler(){this.layerListWidget&&(this.layerListWidget.visibilityAppearance=this.visibilityIcon==="checkbox"?"checkbox":"default")}render(){return s`<div class="layer-list-widget"></div>`}async updated(){this.hasUpdated||await this._initLayerListWidget()}async loaded(){await this._initLayerListWidget()}async _initLayerListWidget(){this.mapView&&(this.layerListWidget=new l({view:this.mapView,visibilityAppearance:this.visibilityIcon==="checkbox"?"checkbox":"default"}))}};r("layer-list-widget",i);return i},"widgets/LayerList")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{b as r}from"./36I27Q5R.js";import{c as o}from"./VU3OQQKP.js";var s=r(o);export{s as a};
2
+ import{b as r}from"./36I27Q5R.js";import{c as o}from"./LI7AOAAS.js";var s=r(o);export{s as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import e from"./QJ4MQK3Y.js";import{a as V}from"./LLYTIOG4.js";import c from"./5UEEUPL5.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import{a as L}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as E}from"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as T,c as k}from"./VU3OQQKP.js";import{F as d,G as h,H as x,J as p,h as S,i as l,l as m,r as w,s as v,u as $}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([A,G,U,N,u,f,,{g:C,j:I},{a:P,d:O,e:D,f:R}])=>{var M=S`@layer{:host{display:block;--calcite-input-message-spacing-value: 0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-2{width:50%}.w-1-3{width:33.33%}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-bottom-0{padding-bottom:0!important}.padding-inline-start-0{padding-inline-start:0!important}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-block-start-1{padding-block-start:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-top-1-2{padding-block-start:.5rem!important}.padding-top-1{padding-top:1rem}.indent-group{border-inline-start:1px solid var(--calcite-color-border-2);margin-bottom:.5rem;padding-inline-start:1rem;margin-inline-start:.5rem}.margin-bottom-0-5{margin-bottom:.5rem}.margin-top-0-5{margin-top:.5rem!important}.instructional-text{line-height:1;padding:0!important;margin:0;color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2)}.info-blue{color:var(--calcite-color-status-info)}.info-message{justify-content:center;display:grid}.font-bold{font-weight:700}.header-label{font-weight:700;font-size:var(--calcite-font-size-0)}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-start-1-2{padding-inline-start:.5rem}.list-border{border:1px solid var(--calcite-color-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{margin-inline-start:.5rem}.margin-top-0{margin-block-start:0!important}.margin-top-1{margin-top:1rem!important}.label-margin-0{--calcite-label-margin-bottom: 0}.list-label{color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-bold)!important}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:.125rem;color:var(--calcite-color-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-color-foreground-3: var(--calcite-color-brand);--calcite-color-foreground-2: var(--calcite-color-brand-hover);--calcite-color-text-1: var(--calcite-color-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}.list-container{padding:0 1rem 1rem}.list-items{align-items:center;background-color:#fff;box-shadow:0 1px 3px #0000001a;font-family:sans-serif;padding:12px 16px}.list-item{display:flex;align-items:center;justify-content:space-between}.item-label{color:#4a4a4a;font-size:16px}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}calcite-segmented-control{--calcite-segmented-control-border-color: var(--calcite-color-border-2)}calcite-segmented-control-item{--calcite-segmented-control-color: var(--calcite-color-text-3)}calcite-segmented-control-item[checked]{--calcite-segmented-control-border-color: var(--calcite-color-surface-highlight);--calcite-segmented-control-background-color: var(--calcite-color-surface-highlight);--calcite-segmented-control-color: var(--calcite-color-text-highlight)}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,b=class extends v{constructor(){super(),this.managedLayers={},this.managedTables=[],this.highlightHandles=[]}removeHandles(){this.highlightHandles.forEach(e=>{e?.remove()}),this.highlightHandles=[]}},y=class extends x{constructor(){super(),this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=!1,this.customExport=!1,this.customExportURL="",this.defaultBufferDistance=0,this.defaultBufferUnit="feet",this.defaultExportTitle="",this.defaultNumLabelsPerPage=6,this.enableLayerFeatures=!0,this.enableLayerFeaturesOnLoad=!1,this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.enableSketchTools=!0,this.featureHighlightEnabled=!1,this.noResultText="",this.initialNotice="",this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this._exportGraphics=!1,this._addMap=!1,this._addResults=!0,this._addTitle=!1,this._downloadActive=!0,this._exportType="PDF",this._fetchingData=!1,this._isMobile=!1,this._numDuplicates=0,this._pageType="LIST",this._saveEnabled=!1,this._selectionSets=[],this._segmentType="STANDARD",this._selectedReportingLayerId="",this._isInitialLoading=!0,this._layoutTemplates=[],this._translations=E({name:"public-notification",blocking:!0}),this._downloadTools=d(),this.layoutTemplateSelectRef=d(),this.reportTemplateSelectRef=d(),this._onboardingImageUrl="",this._popupsEnabled=!1,this._removeDuplicates=d(),this._selectTools=d(),this._refineSelection=d(),this._titleElement=d(),this._titleValue=void 0,this._numSelected=0,this._pnStateContextProvider=L({context:V}),this._refineGraphics=[],this._reportTemplates=[],this._reportTemplatesInfo=[],this.searchConfigurationChange=w(),this.listenOn(window,"selectionSetsChanged",this.selectionSetsChanged),this._pnState=new b,this._pnStateContextProvider.setValue(this._pnState)}static{this.properties={addresseeLayerIds:0,bufferColor:1,bufferOutlineColor:1,customLabelEnabled:5,customExport:5,customExportURL:1,defaultBufferDistance:9,defaultBufferUnit:1,defaultExportTitle:1,defaultNumLabelsPerPage:9,enableLayerFeatures:5,enableLayerFeaturesOnLoad:5,enableSearchDistance:5,enableSearchDistanceOnLoad:5,enableSketchTools:5,featureEffect:0,featureHighlightEnabled:5,mapView:0,noResultText:1,initialNotice:1,searchConfiguration:0,selectionLayerIds:0,showRefineSelection:5,showSearchSettings:5,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,_exportGraphics:16,_addMap:16,_addResults:16,_addTitle:16,_downloadActive:16,_exportType:16,_fetchingData:16,_isMobile:16,_numDuplicates:16,_pageType:16,_saveEnabled:16,_selectionSets:16,_segmentType:16,_selectedReportingLayerId:16,_isInitialLoading:16,_layoutTemplates:16,_translations:16}}static{this.styles=M}static{this.shadowRootOptions=$}willUpdate(e){e.has("mapView")&&this.mapView&&this.mapViewWatchHandler(this.mapView),e.has("searchConfiguration")&&this.searchConfiguration&&this.watchSearchConfigurationHandler(this.searchConfiguration,e.get("searchConfiguration")),e.has("sketchLineSymbol")&&this.sketchLineSymbolWatchHandler(this.sketchLineSymbol,e.get("sketchLineSymbol")),e.has("sketchPointSymbol")&&this.sketchPointSymbolWatchHandler(this.sketchPointSymbol,e.get("sketchPointSymbol")),e.has("sketchPolygonSymbol")&&this.sketchPolygonSymbolWatchHandler(this.sketchPolygonSymbol,e.get("sketchPolygonSymbol")),e.has("_pageType")&&(this.hasUpdated||this._pageType!=="LIST")&&this.pageTypeWatchHandler(this._pageType,e.get("_pageType")),(e.has("customExport")||e.has("customExportURL"))&&this.hasUpdated&&this._setTemplates()}async mapViewWatchHandler(e){e?.popup&&(this._popupsEnabled=e?.popupEnabled),this.searchConfiguration&&this._initSearchConfiguration(this.searchConfiguration)}async watchSearchConfigurationHandler(e,t){let i=JSON.stringify(e);this.mapView&&(i!==JSON.stringify(t)||i&&!this._searchConfiguration)&&(this._searchConfiguration=JSON.parse(i),this._searchConfiguration&&this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(e,t){e&&JSON.stringify(e)!==JSON.stringify(t)&&this._setLineSymbol(e)}async sketchPointSymbolWatchHandler(e,t){e&&JSON.stringify(e)!==JSON.stringify(t)&&this._setPointSymbol(e)}async sketchPolygonSymbolWatchHandler(e,t){e&&JSON.stringify(e)!==JSON.stringify(t)&&this._setPolygonSymbol(e)}async pageTypeWatchHandler(e,t){if(this._checkPopups(),this.mapView?.popup&&(this.mapView.popupEnabled=e!=="LIST"?!1:this._popupsEnabled),e==="EXPORT"&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._updateExportGraphics(),this._fetchingData=!1),this._clearHighlight(),(t==="SELECT"||t==="REFINE")&&await this._clearSelection(),t==="EXPORT"&&this._removeExportGraphics(),e!=="SELECT")return this._highlightFeatures()}selectionSetsChanged(e){this._selectionSets=[...e.detail]}connectedCallback(){super.connectedCallback(),this._mediaQuery=window.matchMedia("(max-width: 600px)"),this.listenOn(this._mediaQuery,"change",e=>this._setIsMobile(e))}async load(){this._initSymbols(),this._onboardingImageUrl=k("assets/public-notification/images/onboarding.png")}render(){let e=this._isMobile?"footer":"header";return l`<calcite-shell>${this._isInitialLoading?l`<calcite-loader label></calcite-loader>`:l`<calcite-action-bar class="border-bottom-1 action-bar-size" expand-disabled layout=horizontal slot=${e??m}>${this._getActionGroup("list-check","LIST",this._translations.myLists)}${this.showRefineSelection?this._getActionGroup("test-data","REFINE",this._translations.refineSelection):null}${this._getActionGroup("export","EXPORT",this._translations.export)}</calcite-action-bar>${this._getPage(this._pageType)}`}</calcite-shell>`}async loaded(){this.searchConfiguration&&this._initSearchConfiguration(this.searchConfiguration),this.customExport&&this.customExportURL&&await this._setTemplates(),this._isInitialLoading=!1}_initSearchConfiguration(e){this.searchConfiguration&&!this._searchConfiguration&&this.mapView&&(this._searchConfiguration=e,this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(e){let t=e?.type==="simple-line";this.sketchLineSymbol=t?e:this._jsonUtils?.fromJSON(e||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(e){let t=e?.type==="simple-marker";this.sketchPointSymbol=t?e:this._jsonUtils?.fromJSON(e||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(e){let t=e?.type==="simple-fill";this.sketchPolygonSymbol=t?e:this._jsonUtils?.fromJSON(e||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(e){this._isMobile=e.matches}_getActionGroup(e,t,i){let s=this.showRefineSelection?"w-1-3":"w-1-2";return l`<calcite-action-group class=${p(s)} layout=horizontal><div class="background-override"><calcite-action .active=${this._pageType===t} alignment=center appearance=solid class="width-full height-full" .icon=${e} id=${e??m} @click=${()=>{this._setPageType(t)}} text></calcite-action></div><calcite-tooltip label placement=bottom .referenceElement=${e}><span>${i}</span></calcite-tooltip></calcite-action-group>`}_setPageType(e){this._pageType=e}_getPage(e){let t;switch(e){case"LIST":t=this._getListPage();break;case"SELECT":t=this._getSelectPage();break;case"EXPORT":t=this._getExportPage();break;case"REFINE":t=this._getRefinePage();break}return t}_getListPage(){let e=this._hasSelections(),t=e?this._translations.listHasSetsTip:this.initialNotice!==""?this.initialNotice:this._translations.selectLayerAndAdd;return l`<calcite-panel>${this._getLabel(this._translations.myLists,!1,"header-label")}${this._getNotice(t||"","padding-sides-1 padding-bottom-1","word-wrap-anywhere")}${e?this._getSelectionSetList():this._getOnboardingImage()}<div class="display-flex padding-1"><calcite-button @click=${()=>{this._setPageType("SELECT")}} width=full><span class="font-weight-500">${this._translations.add}</span></calcite-button></div></calcite-panel>`}_getOnboardingImage(){return l`<div class="display-flex padding-sides-1"><img class="img-container" role=presentation src=${this._onboardingImageUrl??m}></div>`}_getSelectionSetList(){return l`<div class="padding-top-1-2 padding-bottom-1-2"><calcite-list class="list-border margin-sides-1" label>${this._selectionSets.reduce((e,t,i)=>{let s=this._getSelectionSetIds(t),a=!0;return t.workflowType==="REFINE"&&(a=Object.keys(t.refineInfos).reduce((o,c)=>{let n=t.refineInfos[c];return o+=n.addIds.length+n.removeIds.length,o},0)>0),a&&e.push(l`<calcite-list-item .label=${t.label} @click=${()=>this.mapView&&this._gotoSelection(t,this.mapView)}><div slot=content><div class="list-label">${t.label}</div><div class="list-description">${t?.layerView?.layer.title}</div><div class="list-description">${this._translations.selectedFeatures.replace("{{n}}",s.length.toString())}</div></div>${this._getAction(!0,"pencil","",o=>this._openSelection(t,o),!1,"actions-end")}${this._getAction(!0,"x","",o=>this._deleteSelection(i,o),!1,"actions-end")}</calcite-list-item>`),e},[])}</calcite-list></div>`}_getSelectionSetIds(e){return e.workflowType!=="REFINE"?e.selectedIds:Object.keys(e.refineInfos).reduce((t,i)=>[...t,...e.refineInfos[i].addIds],[])}_hasSelections(e=!1){let t=[],i=this._selectionSets.some(s=>s.workflowType==="REFINE"?(t=this._getSelectionSetIds(s),!0):!1);return e&&i?t.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){let e=this._getExportInfos(),t=this.mapView?.map&&await P(this.mapView.map,e),i=t&&O(t);return t&&i?t.length-i.length:0}_getExportInfos(){return this._selectionSets.reduce((e,t)=>{if(t.download)if(t.workflowType!=="REFINE"&&t?.layerView){let i=t.layerView.layer.id;i!==void 0&&this._updateIds(i,t.layerView,t.selectedIds,e)}else Object.keys(t.refineInfos).forEach(i=>{let s=t.refineInfos[i];s.addIds.length>0&&this._updateIds(i,s.layerView,s.addIds,e)});return e},{})}_updateIds(e,t,i,s){return s[e]?s[e].ids=s[e].ids.concat(i):s[e]={layerView:t,ids:i},s}_getSelectPage(){let e=this._translations.selectSearchTip;return l`<calcite-panel>${this._getLabel(this._translations?.stepTwoFull,!0,"header-label")}${this._getNotice(e,"padding-1","word-wrap-anywhere")}<div><map-select-tools .bufferColor=${this.bufferColor} .bufferOutlineColor=${this.bufferOutlineColor} class="" .customLabelEnabled=${this.customLabelEnabled} .defaultBufferDistance=${this.defaultBufferDistance} .defaultBufferUnit=${this.defaultBufferUnit} .enableLayerFeatures=${this.enableLayerFeatures} .enableLayerFeaturesOnLoad=${this.enableLayerFeaturesOnLoad} .enableSearchDistance=${this.enableSearchDistance} .enableSearchDistanceOnLoad=${this.enableSearchDistanceOnLoad} .enableSketchTools=${this.enableSketchTools} .enabledLayerIds=${this.addresseeLayerIds} header-label-class .isUpdate=${!!this._activeSelection} .mapView=${this.mapView} .noResultText=${this.noResultText} @selectionSetChange=${this._updateForSelection} .searchConfiguration=${this._searchConfiguration} .searchDistanceEnabled=${this.enableSearchDistanceOnLoad} .selectionLayerIds=${this.selectionLayerIds} .selectionSet=${this._activeSelection} .sketchLineSymbol=${this.sketchLineSymbol} .sketchPointSymbol=${this.sketchPointSymbol} .sketchPolygonSymbol=${this.sketchPolygonSymbol} .useLayerFeaturesEnabled=${this.enableLayerFeaturesOnLoad} ${h(this._selectTools)}></map-select-tools></div>${this._getPageNavButtons(this._translations.done,this._numSelected===0,()=>{this._saveSelection()},this._translations.cancel,!1,()=>{this._home()})}</calcite-panel>`}_getExportPage(){let e=this._hasSelections(this.showRefineSelection),t=this._numDuplicates>0?"display-block":"display-none",i=this.customExport&&this.customExportURL&&this._layoutTemplates.length;return l`<calcite-panel><div>${this._getLabel(this._translations.export,!1,"header-label")}${e?l`<div>${this._getNotice(this._translations.exportTip,"padding-sides-1")}${this._getLabel(this._translations.exportListsLabel,!1,"")}${this._getExportSelectionLists()}<div class=${`padding-sides-1 ${t}`}><div class="display-flex"><calcite-label layout=inline><calcite-checkbox ${h(this._removeDuplicates)}></calcite-checkbox><div class="display-flex">${this._translations.removeDuplicate}<div class="info-message padding-start-1-2"><calcite-input-message class="info-blue margin-top-0" scale=m>${` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`}</calcite-input-message></div></div></calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=remove-duplicates-icon scale=s></calcite-icon></div><calcite-popover closable label overlay-positioning=fixed reference-element=remove-duplicates-icon><span class="tooltip-message">${this._translations.duplicatesTip}</span></calcite-popover></div><div class="border-bottom"></div><div class="segmented-controls padding-top-sides-1">${this._getLabel(this._translations.exportOptions,!0,"","margin-bottom-0-5")}${this._getSegmentedControls()}</div>${i?this._getCustomPrintOptions():l`<div class="padding-1 padding-bottom-0">${this._getExportOptions()}</div>`}<div class="padding-1 display-flex"><calcite-button .disabled=${!this._downloadActive||this._fetchingData||!this._addMap&&!this._addResults} .loading=${this._fetchingData} @click=${()=>this._segmentType==="CUSTOM"?this._customExport():void this._standardExport()} width=full><span class="font-weight-500">${this._translations.export}</span></calcite-button></div></div>`:this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")}</div></calcite-panel>`}_customExport(){if(!this.mapView)return;let e=this.layoutTemplateSelectRef.value?this.layoutTemplateSelectRef.value.selectedOption.value:"",t=this.reportTemplateSelectRef.value?this.reportTemplateSelectRef.value.selectedOption.value:"";this._fetchingData=!0;let i=this._reportTemplatesInfo.find(n=>n.reportTemplate===t),s=i?{...i.reportOptions}:{},a=this._selectedReportingLayerId;s?.reportSectionOverrides&&Object.keys(s.reportSectionOverrides).forEach(n=>{s.reportSectionOverrides[n].sourceId=a});let o=new G({layout:e,report:t,format:"pdf",layoutOptions:{titleText:this._titleElement.value?.value},reportOptions:s}),c=new U({view:this.mapView,template:o});N.execute(this.customExportURL,c).then(n=>{let g=this._titleValue;if(!g){let r=this._getSelectionIdsAndViews(this._selectionSets,!0),_=R(r);g=D(_)}n.url&&g&&this._downloadCustomPDF(n.url,g),this._fetchingData=!1}).catch(n=>{this._fetchingData=!1,console.error(n)})}async _downloadCustomPDF(e,t){try{let i=await fetch(e);if(!i.ok)throw new Error(`Failed to fetch PDF: ${i.statusText}`);let s=await i.blob(),a=window.URL.createObjectURL(s),o=document.createElement("a");o.href=a,o.download=t||"download.pdf";let c=document.getElementById("custom-export-div");c&&(c.appendChild(o),o.click(),window.URL.revokeObjectURL(a),c.removeChild(o))}catch(i){console.error("Download failed:",i)}}_exportTypeChange(e){this._exportType=e.target.value}_segmentTypeChange(e){this._titleValue="",this._segmentType=e.target.value}_getSegmentedControls(){return this.customExport&&this.customExportURL&&this._layoutTemplates.length?this._getStandardAndCustomSegmentedControl():this._getPDFAndCSVSementedControl()}_getPDFAndCSVSementedControl(){return l`<calcite-segmented-control class="w-100 calcite-segments" @calciteSegmentedControlChange=${this._exportTypeChange} width=full><calcite-segmented-control-item .checked=${this._exportType==="PDF"} class="w-50 end-border" value=PDF><span class="font-weight-500">${this._translations.pdf}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${this._exportType==="CSV"} class="w-50" value=CSV><span class="font-weight-500">${this._translations.csv}</span></calcite-segmented-control-item></calcite-segmented-control>`}_getStandardAndCustomSegmentedControl(){return l`<calcite-segmented-control class="w-100 calcite-segments" @calciteSegmentedControlChange=${this._segmentTypeChange} width=full><calcite-segmented-control-item .checked=${this._segmentType==="STANDARD"} class="w-50 end-border" value=STANDARD><span class="font-weight-500">${this._translations.standard}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${this._segmentType==="CUSTOM"} class="w-50" value=CUSTOM><span class="font-weight-500">${this._translations.custom}</span></calcite-segmented-control-item></calcite-segmented-control>`}_getCustomPrintOptions(){return this._segmentType==="STANDARD"?this._getStandardExportOptions():this._getCustomExportOptions()}_getStandardExportOptions(){return l`<div class="padding-1 padding-bottom-0"><calcite-label layout=inline alignment=start scale=m><calcite-radio-button .checked=${this._exportType==="PDF"} scale=m value=PDF @calciteRadioButtonChange=${this._exportTypeChange}></calcite-radio-button>${this._translations.pdf}</calcite-label><div class=indent-group>${this._getExportOptions()}</div><calcite-label layout=inline class="margin-top-1" alignment=start scale=m><calcite-radio-button .checked=${this._exportType==="CSV"} scale=m value=CSV @calciteRadioButtonChange=${this._exportTypeChange}></calcite-radio-button>${this._translations.csv}</calcite-label></div>`}_getCustomExportOptions(){let e=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"",t=[],i=this._getSelectionIdsAndViews(this._selectionSets,!0);return Object.keys(i).forEach(s=>{i[s].ids.length&&t.push(s)}),l`<div id=custom-export-div class="padding-top-sides-1"><p class="instructional-text">${this._translations.formattingTip}</p>${t.length>1&&l`<p class="instructional-text margin-top-0-5">${this._translations.selectMatchingInputLayersLabel}</p>`||""}<div class=${"margin-top-1"}>${this._getLabel(this._translations.title,!0,"","none")}<calcite-input-text class="padding-inline-start-0 padding-top-1-2" @calciteInputTextInput=${()=>this._changeTitle()} .placeholder=${this._translations.titlePlaceholder} .value=${e} ${h(this._titleElement)}></calcite-input-text></div><div class=${"margin-top-1"}>${this._getLabel(this._translations.layoutTemplate,!0,"","none")}</div><calcite-select class="padding-inline-start-0 padding-top-1-2" label ${h(this.layoutTemplateSelectRef)}>${this._layoutTemplates.map((s,a)=>l`<calcite-option .selected=${a===0} .value=${s}>${s}</calcite-option>`)}</calcite-select>${this._reportTemplates?.length&&l`<div class=${"margin-top-1"}>${this._getLabel(this._translations.reportTemplate,!0,"","none")}</div><calcite-select class="padding-inline-start-0 padding-top-1-2" label ${h(this.reportTemplateSelectRef)}>${this._reportTemplates.map((s,a)=>l`<calcite-option .selected=${a===0} .value=${s}>${s}</calcite-option>`)}</calcite-select><div class=${"padding-top-sides-1 padding-inline-start-0 display-flex margin-bottom-0-5"}><calcite-label class="label-margin-0" layout=inline>${this._translations.reportLayer}</calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=information id=filter-message-info scale=s></calcite-icon><calcite-popover closable label overlay-positioning=fixed reference-element=filter-message-info><span class="tooltip-message">${this._translations.sourceLayerWarning}</span></calcite-popover></div><map-layer-picker .disabled=${t.length<=1} .enabledLayerIds=${t} .mapView=${this.mapView} @layerSelectionChange=${s=>{this._selectedReportingLayerId=s.detail[0]}} .selectedIds=${[this._selectedReportingLayerId]}></map-layer-picker>`||""}</div>`}async _setTemplates(){if(!this.customExportURL||!this.customExport){this.resetCustomExport();return}let e=this.customExportURL,t=`${e.split("/GPServer")?.[0]}/GPServer`;try{let i=await this.getTasksInfo(t),s="",a=i.tasks?.map(async r=>{await this.getTaskType(r,t)==="GetReportTemplatesInfo"&&(s=`${t}/${r}`)});a&&await Promise.all(a),s&&i.executionType&&await this._fetchReportTemplates(s,i.executionType);let o=(await f(e,{authMode:"auto",responseType:"json",query:{f:"json"}}))?.data,c=o.parameters.find(r=>r.name==="Layout_Template"&&Array.isArray(r.choiceList)),n=o.parameters.find(r=>r.name==="Report_Template"&&Array.isArray(r.choiceList));this._layoutTemplates=c?c.choiceList:[];let g=n?n.choiceList:[];this._reportTemplates=this._reportTemplatesInfo.length?g.filter(r=>this._reportTemplatesInfo.some(_=>_.reportTemplate===r)):[]}catch(i){this.resetCustomExport(),console.error(i)}}resetCustomExport(){this._layoutTemplates=[],this._reportTemplates=[],this._segmentType="STANDARD"}async getTaskType(e,t){if(!e||!t)return Promise.resolve("");let i=`${t}/${e}`;try{let s=(await f(i,{authMode:"auto",responseType:"json",query:{f:"json"}}))?.data?.name||"";return Promise.resolve(s)}catch(s){return console.error(s),Promise.resolve("")}}async getTasksInfo(e){if(!e)return Promise.resolve({});let t=`${e}?f=json`,i={authMode:"auto",responseType:"json",query:{f:"json"}};try{let s=(await f(t,i))?.data,a=s?.tasks,o=s?.executionType==="esriExecutionTypeSynchronous"?"execute":"submitJob";return{tasks:a,supportedOperations:o,executionType:s?.executionType}}catch(s){return this.resetCustomExport(),console.error(s),{}}}async _fetchReportTemplates(e,t){if(e)try{if(t==="esriExecutionTypeSynchronous"){let i=(await u.execute(e,{}))?.results?.find(s=>s.paramName==="Output_JSON");this._reportTemplatesInfo=i?.value??[]}else{let i=await u.submitJob(e,{});await i.waitForJobCompletion();let s=await i.fetchResultData("Output_JSON");this._reportTemplatesInfo=s?.value??[]}this._reportTemplatesInfo=this._reportTemplatesInfo.filter(i=>{let s=i.reportOptions;if(s?.reportSectionOverrides){let a=0;return Object.keys(s.reportSectionOverrides).forEach(o=>{s.reportSectionOverrides[o].hasOwnProperty("sourceId")&&a++}),a<=1}else return!0})}catch(i){console.error("Failed to fetch report templates:",i)}}_getExportOptions(){let e=this._exportType==="PDF"?"display-block":"display-none",t=this._addTitle?"display-block":"display-none",i=this._addMap?"display-flex":"display-none",s=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"",a=this._addResults?"":"display-none";return l`<div class=${p(e)}><p class="instructional-text">${this._translations.selectContentTip}</p><div class="padding-top-sides-1 padding-inline-start-0"><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._addResults} @calciteCheckboxChange=${()=>this._addResults=!this._addResults}></calcite-checkbox>${this._translations.addResults}</calcite-label></div><div class=${`indent-group margin-top-1 ${a}`}><div class="margin-bottom-0-5"><calcite-label class="label-margin-0">${this._translations.selectPDFLabelOption}</calcite-label></div><div><pdf-download .defaultNumLabelsPerPage=${Number.parseInt(this.defaultNumLabelsPerPage.toString(),10)} .disabled=${!this._downloadActive} ${h(this._downloadTools)}></pdf-download></div></div><div class="padding-top-sides-1 padding-inline-start-0"><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._addTitle} @calciteCheckboxChange=${()=>this._addTitle=!this._addTitle}></calcite-checkbox>${this._translations.title}</calcite-label></div><div class=${`${t} indent-group margin-top-0-5`}><calcite-input-text class="padding-inline-start-0 padding-top-1-2" @calciteInputTextInput=${()=>this._changeTitle()} .placeholder=${this._translations.titlePlaceholder} .value=${s} ${h(this._titleElement)}></calcite-input-text></div><div class="padding-top-sides-1 padding-inline-start-0"><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._addMap} @calciteCheckboxChange=${()=>this._handleAddMapChange()}></calcite-checkbox>${this._translations.includeMap}</calcite-label></div><div class=${`padding-top-sides-1 padding-inline-start-0 ${i}`}><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._exportGraphics} @calciteCheckboxChange=${()=>this._handleExportGraphicsChange()}></calcite-checkbox>${this._translations.listGraphics}</calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=list-graphics-icon scale=s></calcite-icon><calcite-popover closable label overlay-positioning=fixed reference-element=list-graphics-icon><span class="tooltip-message">${this._translations.listGraphicsTip}</span></calcite-popover></div></div>`}_handleAddMapChange(){this._addMap=!this._addMap,this._updateExportGraphics()}_handleExportGraphicsChange(){this._exportGraphics=!this._exportGraphics,this._updateExportGraphics()}_getManagedLayer(e){let t,i=this._pnStateContextProvider.value;return Object.keys(i.managedLayers).some(s=>{let a=this.mapView?.map.layers.findIndex(o=>o.title===s);return i.managedLayers[s]===e&&a!==void 0?(t=this.mapView?.map.layers.getItemAt(a),!0):!1}),t}_updateExportGraphics(e=!1){(e||!this._exportGraphics||!this._addMap)&&this._removeExportGraphics(),this._exportGraphics&&this._addMap&&this._addExportGraphics()}_removeExportGraphics(){let e=this._getManagedLayer("sketch"),t=this._getManagedLayer("buffer");e&&e.graphics.removeAll(),t&&t.graphics.removeAll()}_addExportGraphics(){let e=this._getManagedLayer("sketch"),t=this._getManagedLayer("buffer");this._refineGraphics.forEach(i=>{e?.add(i.drawnGraphic),t?.add(i.bufferGraphic)}),this._selectionSets.forEach(i=>{if(i.download&&(e&&i.sketchGraphic&&e.graphics.add(i.sketchGraphic),t)){let s={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},a=new A({geometry:i.buffer,symbol:s});a&&t.graphics.add(a)}})}_getRefinePage(){let e=this._hasSelections();return l`<calcite-panel>${this._getLabel(this._translations.refineSelection,!1,"header-label")}${e?l`<div>${this._getNotice(this._translations.refineTip,"padding-sides-1")}<refine-selection .enabledLayerIds=${this.selectionLayerIds} .mapView=${this.mapView} .drawnGraphicsArr=${this._refineGraphics} .selectionSets=${this._selectionSets} .sketchLineSymbol=${this.sketchLineSymbol} .sketchPointSymbol=${this.sketchPointSymbol} .sketchPolygonSymbol=${this.sketchPolygonSymbol} .bufferColor=${this.bufferColor} .bufferOutlineColor=${this.bufferOutlineColor} .defaultBufferDistance=${this.defaultBufferDistance} .defaultBufferUnit=${this.defaultBufferUnit} .enableSearchDistance=${this.enableSearchDistance} .enableSearchDistanceOnLoad=${this.enableSearchDistanceOnLoad} .searchDistanceEnabled=${this.enableSearchDistanceOnLoad} ${h(this._refineSelection)}></refine-selection></div>`:this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1")}</calcite-panel>`}_getPageNavButtons(e,t,i,s,a,o){return l`<div class="padding-bottom-1"><div class="display-flex padding-top-sides-1"><calcite-button .disabled=${t} @click=${i} width=full><span class="font-weight-500">${e}</span></calcite-button></div><div class="display-flex padding-top-1-2 padding-sides-1"><calcite-button appearance=outline .disabled=${a} @click=${o} width=full><span class="font-weight-500">${s}</span></calcite-button></div></div>`}_changeTitle(){this._titleElement.value?.value&&(this._titleValue=this._titleElement.value.value||"")}_getNotice(e,t="padding-1",i=""){return l`<calcite-notice class=${p(t)} icon=lightbulb kind=success open><div class=${p(i)} slot=message>${e}</div></calcite-notice>`}_getLabel(e,t=!1,i="font-bold",s="padding-top-sides-1"){return i+=t?" label-margin-0":"",l`<div class=${p(s)}><calcite-label class=${p(i)}>${e}</calcite-label></div>`}_getExportSelectionLists(){return this._selectionSets.reduce((e,t)=>{let i=this._getSelectionSetIds(t),s=t.workflowType!=="REFINE"||i.length>0;return!this._downloadActive&&t.download&&s&&(this._downloadActive=!0),s&&e.push(l`<div class="display-flex padding-sides-1 padding-bottom-1"><calcite-checkbox .checked=${t.download} class="align-center" @calciteCheckboxChange=${()=>{this._toggleDownload(t.id)}}></calcite-checkbox><calcite-list class="list-border margin-start-1-2 width-full" id=download-list label><calcite-list-item .disabled=${!t.download} .label=${t.label} @click=${()=>{this._toggleDownload(t.id)}}><div slot=content><div class="list-label">${t.label}</div><div class="list-description">${t.layerView?.layer.title}</div><div class="list-description">${this._translations.selectedFeatures.replace("{{n}}",i.length.toString())}</div></div></calcite-list-item></calcite-list></div>`),e},[])||l`<div></div>`}async _toggleDownload(e){let t=!1;this._selectionSets=this._selectionSets.map(i=>{let s=!1;return i.refineInfos&&Object.keys(i.refineInfos).forEach(a=>{i.refineInfos[a].addIds.length&&(s=!0)}),(i.workflowType!=="REFINE"||s)&&(i.download=i.id===e?!i.download:i.download,t=i.download?!0:t),i}),this._updateExportGraphics(!0),this._downloadActive=t,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _standardExport(){let e=this._addResults?this._getSelectionIdsAndViews(this._selectionSets,!0):{};if(this._exportType==="PDF"){let t="";this._addMap&&this.mapView&&(t=(await this.mapView.takeScreenshot({width:1500,height:2e3}))?.dataUrl),this._fetchingData=!0,this._downloadTools.value&&this._removeDuplicates.value&&this.mapView?.map&&await this._downloadTools.value.downloadPDF(this.mapView.map,e,this._removeDuplicates.value.checked,this._addTitle&&this._titleElement.value?this._titleElement.value.value:"",t),this._fetchingData=!1}this._exportType==="CSV"&&(this._fetchingData=!0,this._downloadTools.value&&this.mapView?.map&&await this._downloadTools.value.downloadCSV(this.mapView.map,e,this._removeDuplicates.value?.checked||!1),this._fetchingData=!1)}_getSelectionIdsAndViews(e,t=!1){return(t?e.filter(i=>i.download):e).reduce((i,s)=>{if(s.workflowType==="REFINE")Object.keys(s.refineInfos).forEach(a=>{let o=s.refineInfos[a];if(o.addIds){let c=o.layerView.layer.id;i=this._updateExportInfos(i,c,s.label,o.addIds,o.layerView)}});else{let a=s?.layerView?.layer.id;a!==void 0&&s.layerView&&(i=this._updateExportInfos(i,a,s.label,s.selectedIds,s.layerView))}return i},{})}_updateExportInfos(e,t,i,s,a){return t&&Object.keys(e).indexOf(t)>-1?(e[t].ids=[...new Set([...e[t].ids,...s])],e[t].selectionSetNames.push(i)):t&&(e[t]={ids:s,layerView:a,selectionSetNames:[i]}),e}_getAction(e,t,i,s,a=!1,o=""){return l`<calcite-action appearance=solid .disabled=${!e} .icon=${t} icon-flip-rtl .indicator=${a} @click=${s} slot=${o??m} .text=${i}></calcite-action>`}_updateForSelection(e){this._numSelected=e.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType("LIST")}async _saveSelection(){let e=await this._selectTools.value?.getSelection();if(e){let t=this._selectTools.value?.isUpdate;this._selectionSets=t?this._selectionSets.map(i=>i.id===e.id?e:i):[...this._selectionSets,e]}return this._home()}async _clearSelection(){await this._selectTools.value?.clearSelection(),this._numSelected=0,this._activeSelection=void 0}async _deleteSelection(e,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter((i,s)=>(i.workflowType==="REFINE"&&(this._refineGraphics=[]),s!==e?i:!1)),this._highlightFeatures()}_gotoSelection(e,t){e.selectedIds&&e.layerView&&I(e.selectedIds,e.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(e,t){t.stopPropagation(),this._activeSelection=e,this._pageType=e.workflowType==="REFINE"?"REFINE":"SELECT"}async _highlightFeatures(){let e=this._pnStateContextProvider.value;this._clearHighlight();let t=this._getSelectionIdsAndViews(this._selectionSets,this._pageType==="EXPORT"),i=Object.keys(t);if(i.length>0)for(let s=0;s<i.length;s++){let a=t[i[s]];if(a.layerView&&this.mapView){let o=await C(a.ids,a.layerView,this.mapView);e.highlightHandles.push(o)}}}_checkPopups(){typeof this._popupsEnabled!="boolean"&&(this._popupsEnabled=!!this.mapView?.popupEnabled)}_clearHighlight(){let e=this._pnStateContextProvider.value;e&&e.highlightHandles&&e.removeHandles()}};T("public-notification",y);return y},"Graphic","rest/support/PrintTemplate","rest/support/PrintParameters","rest/print","rest/geoprocessor","request",a,b,c,e)
2
+ import e from"./VPNO4RA7.js";import{a as V}from"./LLYTIOG4.js";import c from"./3H5S6KGV.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import{a as L}from"./PZ4L77M5.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as E}from"./6LLQFZGG.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 T,c as k}from"./LI7AOAAS.js";import{F as d,G as h,H as x,J as p,h as S,i as l,l as m,r as w,s as v,u as $}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([A,G,U,N,u,f,,{g:C,j:I},{a:P,d:O,e:D,f:R}])=>{var M=S`@layer{:host{display:block;--calcite-input-message-spacing-value: 0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-2{width:50%}.w-1-3{width:33.33%}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-bottom-0{padding-bottom:0!important}.padding-inline-start-0{padding-inline-start:0!important}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-block-start-1{padding-block-start:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-top-1-2{padding-block-start:.5rem!important}.padding-top-1{padding-top:1rem}.indent-group{border-inline-start:1px solid var(--calcite-color-border-2);margin-bottom:.5rem;padding-inline-start:1rem;margin-inline-start:.5rem}.margin-bottom-0-5{margin-bottom:.5rem}.margin-top-0-5{margin-top:.5rem!important}.instructional-text{line-height:1;padding:0!important;margin:0;color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--2)}.info-blue{color:var(--calcite-color-status-info)}.info-message{justify-content:center;display:grid}.font-bold{font-weight:700}.header-label{font-weight:700;font-size:var(--calcite-font-size-0)}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-start-1-2{padding-inline-start:.5rem}.list-border{border:1px solid var(--calcite-color-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{margin-inline-start:.5rem}.margin-top-0{margin-block-start:0!important}.margin-top-1{margin-top:1rem!important}.label-margin-0{--calcite-label-margin-bottom: 0}.list-label{color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-bold)!important}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:.125rem;color:var(--calcite-color-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-color-foreground-3: var(--calcite-color-brand);--calcite-color-foreground-2: var(--calcite-color-brand-hover);--calcite-color-text-1: var(--calcite-color-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}.list-container{padding:0 1rem 1rem}.list-items{align-items:center;background-color:#fff;box-shadow:0 1px 3px #0000001a;font-family:sans-serif;padding:12px 16px}.list-item{display:flex;align-items:center;justify-content:space-between}.item-label{color:#4a4a4a;font-size:16px}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}calcite-segmented-control{--calcite-segmented-control-border-color: var(--calcite-color-border-2)}calcite-segmented-control-item{--calcite-segmented-control-color: var(--calcite-color-text-3)}calcite-segmented-control-item[checked]{--calcite-segmented-control-border-color: var(--calcite-color-surface-highlight);--calcite-segmented-control-background-color: var(--calcite-color-surface-highlight);--calcite-segmented-control-color: var(--calcite-color-text-highlight)}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,b=class extends v{constructor(){super(),this.managedLayers={},this.managedTables=[],this.highlightHandles=[]}removeHandles(){this.highlightHandles.forEach(e=>{e?.remove()}),this.highlightHandles=[]}},y=class extends x{constructor(){super(),this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=!1,this.customExport=!1,this.customExportURL="",this.defaultBufferDistance=0,this.defaultBufferUnit="feet",this.defaultExportTitle="",this.defaultNumLabelsPerPage=6,this.enableLayerFeatures=!0,this.enableLayerFeaturesOnLoad=!1,this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.enableSketchTools=!0,this.featureHighlightEnabled=!1,this.noResultText="",this.initialNotice="",this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this._exportGraphics=!1,this._addMap=!1,this._addResults=!0,this._addTitle=!1,this._downloadActive=!0,this._exportType="PDF",this._fetchingData=!1,this._isMobile=!1,this._numDuplicates=0,this._pageType="LIST",this._saveEnabled=!1,this._selectionSets=[],this._segmentType="STANDARD",this._selectedReportingLayerId="",this._isInitialLoading=!0,this._layoutTemplates=[],this._translations=E({name:"public-notification",blocking:!0}),this._downloadTools=d(),this.layoutTemplateSelectRef=d(),this.reportTemplateSelectRef=d(),this._onboardingImageUrl="",this._popupsEnabled=!1,this._removeDuplicates=d(),this._selectTools=d(),this._refineSelection=d(),this._titleElement=d(),this._titleValue=void 0,this._numSelected=0,this._pnStateContextProvider=L({context:V}),this._refineGraphics=[],this._reportTemplates=[],this._reportTemplatesInfo=[],this.searchConfigurationChange=w(),this.listenOn(window,"selectionSetsChanged",this.selectionSetsChanged),this._pnState=new b,this._pnStateContextProvider.setValue(this._pnState)}static{this.properties={addresseeLayerIds:0,bufferColor:1,bufferOutlineColor:1,customLabelEnabled:5,customExport:5,customExportURL:1,defaultBufferDistance:9,defaultBufferUnit:1,defaultExportTitle:1,defaultNumLabelsPerPage:9,enableLayerFeatures:5,enableLayerFeaturesOnLoad:5,enableSearchDistance:5,enableSearchDistanceOnLoad:5,enableSketchTools:5,featureEffect:0,featureHighlightEnabled:5,mapView:0,noResultText:1,initialNotice:1,searchConfiguration:0,selectionLayerIds:0,showRefineSelection:5,showSearchSettings:5,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,_exportGraphics:16,_addMap:16,_addResults:16,_addTitle:16,_downloadActive:16,_exportType:16,_fetchingData:16,_isMobile:16,_numDuplicates:16,_pageType:16,_saveEnabled:16,_selectionSets:16,_segmentType:16,_selectedReportingLayerId:16,_isInitialLoading:16,_layoutTemplates:16,_translations:16}}static{this.styles=M}static{this.shadowRootOptions=$}willUpdate(e){e.has("mapView")&&this.mapView&&this.mapViewWatchHandler(this.mapView),e.has("searchConfiguration")&&this.searchConfiguration&&this.watchSearchConfigurationHandler(this.searchConfiguration,e.get("searchConfiguration")),e.has("sketchLineSymbol")&&this.sketchLineSymbolWatchHandler(this.sketchLineSymbol,e.get("sketchLineSymbol")),e.has("sketchPointSymbol")&&this.sketchPointSymbolWatchHandler(this.sketchPointSymbol,e.get("sketchPointSymbol")),e.has("sketchPolygonSymbol")&&this.sketchPolygonSymbolWatchHandler(this.sketchPolygonSymbol,e.get("sketchPolygonSymbol")),e.has("_pageType")&&(this.hasUpdated||this._pageType!=="LIST")&&this.pageTypeWatchHandler(this._pageType,e.get("_pageType")),(e.has("customExport")||e.has("customExportURL"))&&this.hasUpdated&&this._setTemplates()}async mapViewWatchHandler(e){e?.popup&&(this._popupsEnabled=e?.popupEnabled),this.searchConfiguration&&this._initSearchConfiguration(this.searchConfiguration)}async watchSearchConfigurationHandler(e,t){let i=JSON.stringify(e);this.mapView&&(i!==JSON.stringify(t)||i&&!this._searchConfiguration)&&(this._searchConfiguration=JSON.parse(i),this._searchConfiguration&&this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(e,t){e&&JSON.stringify(e)!==JSON.stringify(t)&&this._setLineSymbol(e)}async sketchPointSymbolWatchHandler(e,t){e&&JSON.stringify(e)!==JSON.stringify(t)&&this._setPointSymbol(e)}async sketchPolygonSymbolWatchHandler(e,t){e&&JSON.stringify(e)!==JSON.stringify(t)&&this._setPolygonSymbol(e)}async pageTypeWatchHandler(e,t){if(this._checkPopups(),this.mapView?.popup&&(this.mapView.popupEnabled=e!=="LIST"?!1:this._popupsEnabled),e==="EXPORT"&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._updateExportGraphics(),this._fetchingData=!1),this._clearHighlight(),(t==="SELECT"||t==="REFINE")&&await this._clearSelection(),t==="EXPORT"&&this._removeExportGraphics(),e!=="SELECT")return this._highlightFeatures()}selectionSetsChanged(e){this._selectionSets=[...e.detail]}connectedCallback(){super.connectedCallback(),this._mediaQuery=window.matchMedia("(max-width: 600px)"),this.listenOn(this._mediaQuery,"change",e=>this._setIsMobile(e))}async load(){this._initSymbols(),this._onboardingImageUrl=k("assets/public-notification/images/onboarding.png")}render(){let e=this._isMobile?"footer":"header";return l`<calcite-shell>${this._isInitialLoading?l`<calcite-loader label></calcite-loader>`:l`<calcite-action-bar class="border-bottom-1 action-bar-size" expand-disabled layout=horizontal slot=${e??m}>${this._getActionGroup("list-check","LIST",this._translations.myLists)}${this.showRefineSelection?this._getActionGroup("test-data","REFINE",this._translations.refineSelection):null}${this._getActionGroup("export","EXPORT",this._translations.export)}</calcite-action-bar>${this._getPage(this._pageType)}`}</calcite-shell>`}async loaded(){this.searchConfiguration&&this._initSearchConfiguration(this.searchConfiguration),this.customExport&&this.customExportURL&&await this._setTemplates(),this._isInitialLoading=!1}_initSearchConfiguration(e){this.searchConfiguration&&!this._searchConfiguration&&this.mapView&&(this._searchConfiguration=e,this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(e){let t=e?.type==="simple-line";this.sketchLineSymbol=t?e:this._jsonUtils?.fromJSON(e||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(e){let t=e?.type==="simple-marker";this.sketchPointSymbol=t?e:this._jsonUtils?.fromJSON(e||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(e){let t=e?.type==="simple-fill";this.sketchPolygonSymbol=t?e:this._jsonUtils?.fromJSON(e||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(e){this._isMobile=e.matches}_getActionGroup(e,t,i){let s=this.showRefineSelection?"w-1-3":"w-1-2";return l`<calcite-action-group class=${p(s)} layout=horizontal><div class="background-override"><calcite-action .active=${this._pageType===t} alignment=center appearance=solid class="width-full height-full" .icon=${e} id=${e??m} @click=${()=>{this._setPageType(t)}} text></calcite-action></div><calcite-tooltip label placement=bottom .referenceElement=${e}><span>${i}</span></calcite-tooltip></calcite-action-group>`}_setPageType(e){this._pageType=e}_getPage(e){let t;switch(e){case"LIST":t=this._getListPage();break;case"SELECT":t=this._getSelectPage();break;case"EXPORT":t=this._getExportPage();break;case"REFINE":t=this._getRefinePage();break}return t}_getListPage(){let e=this._hasSelections(),t=e?this._translations.listHasSetsTip:this.initialNotice!==""?this.initialNotice:this._translations.selectLayerAndAdd;return l`<calcite-panel>${this._getLabel(this._translations.myLists,!1,"header-label")}${this._getNotice(t||"","padding-sides-1 padding-bottom-1","word-wrap-anywhere")}${e?this._getSelectionSetList():this._getOnboardingImage()}<div class="display-flex padding-1"><calcite-button @click=${()=>{this._setPageType("SELECT")}} width=full><span class="font-weight-500">${this._translations.add}</span></calcite-button></div></calcite-panel>`}_getOnboardingImage(){return l`<div class="display-flex padding-sides-1"><img class="img-container" role=presentation src=${this._onboardingImageUrl??m}></div>`}_getSelectionSetList(){return l`<div class="padding-top-1-2 padding-bottom-1-2"><calcite-list class="list-border margin-sides-1" label>${this._selectionSets.reduce((e,t,i)=>{let s=this._getSelectionSetIds(t),a=!0;return t.workflowType==="REFINE"&&(a=Object.keys(t.refineInfos).reduce((o,c)=>{let n=t.refineInfos[c];return o+=n.addIds.length+n.removeIds.length,o},0)>0),a&&e.push(l`<calcite-list-item .label=${t.label} @click=${()=>this.mapView&&this._gotoSelection(t,this.mapView)}><div slot=content><div class="list-label">${t.label}</div><div class="list-description">${t?.layerView?.layer.title}</div><div class="list-description">${this._translations.selectedFeatures.replace("{{n}}",s.length.toString())}</div></div>${this._getAction(!0,"pencil","",o=>this._openSelection(t,o),!1,"actions-end")}${this._getAction(!0,"x","",o=>this._deleteSelection(i,o),!1,"actions-end")}</calcite-list-item>`),e},[])}</calcite-list></div>`}_getSelectionSetIds(e){return e.workflowType!=="REFINE"?e.selectedIds:Object.keys(e.refineInfos).reduce((t,i)=>[...t,...e.refineInfos[i].addIds],[])}_hasSelections(e=!1){let t=[],i=this._selectionSets.some(s=>s.workflowType==="REFINE"?(t=this._getSelectionSetIds(s),!0):!1);return e&&i?t.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){let e=this._getExportInfos(),t=this.mapView?.map&&await P(this.mapView.map,e),i=t&&O(t);return t&&i?t.length-i.length:0}_getExportInfos(){return this._selectionSets.reduce((e,t)=>{if(t.download)if(t.workflowType!=="REFINE"&&t?.layerView){let i=t.layerView.layer.id;i!==void 0&&this._updateIds(i,t.layerView,t.selectedIds,e)}else Object.keys(t.refineInfos).forEach(i=>{let s=t.refineInfos[i];s.addIds.length>0&&this._updateIds(i,s.layerView,s.addIds,e)});return e},{})}_updateIds(e,t,i,s){return s[e]?s[e].ids=s[e].ids.concat(i):s[e]={layerView:t,ids:i},s}_getSelectPage(){let e=this._translations.selectSearchTip;return l`<calcite-panel>${this._getLabel(this._translations?.stepTwoFull,!0,"header-label")}${this._getNotice(e,"padding-1","word-wrap-anywhere")}<div><map-select-tools .bufferColor=${this.bufferColor} .bufferOutlineColor=${this.bufferOutlineColor} class="" .customLabelEnabled=${this.customLabelEnabled} .defaultBufferDistance=${this.defaultBufferDistance} .defaultBufferUnit=${this.defaultBufferUnit} .enableLayerFeatures=${this.enableLayerFeatures} .enableLayerFeaturesOnLoad=${this.enableLayerFeaturesOnLoad} .enableSearchDistance=${this.enableSearchDistance} .enableSearchDistanceOnLoad=${this.enableSearchDistanceOnLoad} .enableSketchTools=${this.enableSketchTools} .enabledLayerIds=${this.addresseeLayerIds} header-label-class .isUpdate=${!!this._activeSelection} .mapView=${this.mapView} .noResultText=${this.noResultText} @selectionSetChange=${this._updateForSelection} .searchConfiguration=${this._searchConfiguration} .searchDistanceEnabled=${this.enableSearchDistanceOnLoad} .selectionLayerIds=${this.selectionLayerIds} .selectionSet=${this._activeSelection} .sketchLineSymbol=${this.sketchLineSymbol} .sketchPointSymbol=${this.sketchPointSymbol} .sketchPolygonSymbol=${this.sketchPolygonSymbol} .useLayerFeaturesEnabled=${this.enableLayerFeaturesOnLoad} ${h(this._selectTools)}></map-select-tools></div>${this._getPageNavButtons(this._translations.done,this._numSelected===0,()=>{this._saveSelection()},this._translations.cancel,!1,()=>{this._home()})}</calcite-panel>`}_getExportPage(){let e=this._hasSelections(this.showRefineSelection),t=this._numDuplicates>0?"display-block":"display-none",i=this.customExport&&this.customExportURL&&this._layoutTemplates.length;return l`<calcite-panel><div>${this._getLabel(this._translations.export,!1,"header-label")}${e?l`<div>${this._getNotice(this._translations.exportTip,"padding-sides-1")}${this._getLabel(this._translations.exportListsLabel,!1,"")}${this._getExportSelectionLists()}<div class=${`padding-sides-1 ${t}`}><div class="display-flex"><calcite-label layout=inline><calcite-checkbox ${h(this._removeDuplicates)}></calcite-checkbox><div class="display-flex">${this._translations.removeDuplicate}<div class="info-message padding-start-1-2"><calcite-input-message class="info-blue margin-top-0" scale=m>${` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`}</calcite-input-message></div></div></calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=remove-duplicates-icon scale=s></calcite-icon></div><calcite-popover closable label overlay-positioning=fixed reference-element=remove-duplicates-icon><span class="tooltip-message">${this._translations.duplicatesTip}</span></calcite-popover></div><div class="border-bottom"></div><div class="segmented-controls padding-top-sides-1">${this._getLabel(this._translations.exportOptions,!0,"","margin-bottom-0-5")}${this._getSegmentedControls()}</div>${i?this._getCustomPrintOptions():l`<div class="padding-1 padding-bottom-0">${this._getExportOptions()}</div>`}<div class="padding-1 display-flex"><calcite-button .disabled=${!this._downloadActive||this._fetchingData||!this._addMap&&!this._addResults} .loading=${this._fetchingData} @click=${()=>this._segmentType==="CUSTOM"?this._customExport():void this._standardExport()} width=full><span class="font-weight-500">${this._translations.export}</span></calcite-button></div></div>`:this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")}</div></calcite-panel>`}_customExport(){if(!this.mapView)return;let e=this.layoutTemplateSelectRef.value?this.layoutTemplateSelectRef.value.selectedOption.value:"",t=this.reportTemplateSelectRef.value?this.reportTemplateSelectRef.value.selectedOption.value:"";this._fetchingData=!0;let i=this._reportTemplatesInfo.find(n=>n.reportTemplate===t),s=i?{...i.reportOptions}:{},a=this._selectedReportingLayerId;s?.reportSectionOverrides&&Object.keys(s.reportSectionOverrides).forEach(n=>{s.reportSectionOverrides[n].sourceId=a});let o=new G({layout:e,report:t,format:"pdf",layoutOptions:{titleText:this._titleElement.value?.value},reportOptions:s}),c=new U({view:this.mapView,template:o});N.execute(this.customExportURL,c).then(n=>{let g=this._titleValue;if(!g){let r=this._getSelectionIdsAndViews(this._selectionSets,!0),_=R(r);g=D(_)}n.url&&g&&this._downloadCustomPDF(n.url,g),this._fetchingData=!1}).catch(n=>{this._fetchingData=!1,console.error(n)})}async _downloadCustomPDF(e,t){try{let i=await fetch(e);if(!i.ok)throw new Error(`Failed to fetch PDF: ${i.statusText}`);let s=await i.blob(),a=window.URL.createObjectURL(s),o=document.createElement("a");o.href=a,o.download=t||"download.pdf";let c=document.getElementById("custom-export-div");c&&(c.appendChild(o),o.click(),window.URL.revokeObjectURL(a),c.removeChild(o))}catch(i){console.error("Download failed:",i)}}_exportTypeChange(e){this._exportType=e.target.value}_segmentTypeChange(e){this._titleValue="",this._segmentType=e.target.value}_getSegmentedControls(){return this.customExport&&this.customExportURL&&this._layoutTemplates.length?this._getStandardAndCustomSegmentedControl():this._getPDFAndCSVSementedControl()}_getPDFAndCSVSementedControl(){return l`<calcite-segmented-control class="w-100 calcite-segments" @calciteSegmentedControlChange=${this._exportTypeChange} width=full><calcite-segmented-control-item .checked=${this._exportType==="PDF"} class="w-50 end-border" value=PDF><span class="font-weight-500">${this._translations.pdf}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${this._exportType==="CSV"} class="w-50" value=CSV><span class="font-weight-500">${this._translations.csv}</span></calcite-segmented-control-item></calcite-segmented-control>`}_getStandardAndCustomSegmentedControl(){return l`<calcite-segmented-control class="w-100 calcite-segments" @calciteSegmentedControlChange=${this._segmentTypeChange} width=full><calcite-segmented-control-item .checked=${this._segmentType==="STANDARD"} class="w-50 end-border" value=STANDARD><span class="font-weight-500">${this._translations.standard}</span></calcite-segmented-control-item><calcite-segmented-control-item .checked=${this._segmentType==="CUSTOM"} class="w-50" value=CUSTOM><span class="font-weight-500">${this._translations.custom}</span></calcite-segmented-control-item></calcite-segmented-control>`}_getCustomPrintOptions(){return this._segmentType==="STANDARD"?this._getStandardExportOptions():this._getCustomExportOptions()}_getStandardExportOptions(){return l`<div class="padding-1 padding-bottom-0"><calcite-label layout=inline alignment=start scale=m><calcite-radio-button .checked=${this._exportType==="PDF"} scale=m value=PDF @calciteRadioButtonChange=${this._exportTypeChange}></calcite-radio-button>${this._translations.pdf}</calcite-label><div class=indent-group>${this._getExportOptions()}</div><calcite-label layout=inline class="margin-top-1" alignment=start scale=m><calcite-radio-button .checked=${this._exportType==="CSV"} scale=m value=CSV @calciteRadioButtonChange=${this._exportTypeChange}></calcite-radio-button>${this._translations.csv}</calcite-label></div>`}_getCustomExportOptions(){let e=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"",t=[],i=this._getSelectionIdsAndViews(this._selectionSets,!0);return Object.keys(i).forEach(s=>{i[s].ids.length&&t.push(s)}),l`<div id=custom-export-div class="padding-top-sides-1"><p class="instructional-text">${this._translations.formattingTip}</p>${t.length>1&&l`<p class="instructional-text margin-top-0-5">${this._translations.selectMatchingInputLayersLabel}</p>`||""}<div class=${"margin-top-1"}>${this._getLabel(this._translations.title,!0,"","none")}<calcite-input-text class="padding-inline-start-0 padding-top-1-2" @calciteInputTextInput=${()=>this._changeTitle()} .placeholder=${this._translations.titlePlaceholder} .value=${e} ${h(this._titleElement)}></calcite-input-text></div><div class=${"margin-top-1"}>${this._getLabel(this._translations.layoutTemplate,!0,"","none")}</div><calcite-select class="padding-inline-start-0 padding-top-1-2" label ${h(this.layoutTemplateSelectRef)}>${this._layoutTemplates.map((s,a)=>l`<calcite-option .selected=${a===0} .value=${s}>${s}</calcite-option>`)}</calcite-select>${this._reportTemplates?.length&&l`<div class=${"margin-top-1"}>${this._getLabel(this._translations.reportTemplate,!0,"","none")}</div><calcite-select class="padding-inline-start-0 padding-top-1-2" label ${h(this.reportTemplateSelectRef)}>${this._reportTemplates.map((s,a)=>l`<calcite-option .selected=${a===0} .value=${s}>${s}</calcite-option>`)}</calcite-select><div class=${"padding-top-sides-1 padding-inline-start-0 display-flex margin-bottom-0-5"}><calcite-label class="label-margin-0" layout=inline>${this._translations.reportLayer}</calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=information id=filter-message-info scale=s></calcite-icon><calcite-popover closable label overlay-positioning=fixed reference-element=filter-message-info><span class="tooltip-message">${this._translations.sourceLayerWarning}</span></calcite-popover></div><map-layer-picker .disabled=${t.length<=1} .enabledLayerIds=${t} .mapView=${this.mapView} @layerSelectionChange=${s=>{this._selectedReportingLayerId=s.detail[0]}} .selectedIds=${[this._selectedReportingLayerId]}></map-layer-picker>`||""}</div>`}async _setTemplates(){if(!this.customExportURL||!this.customExport){this.resetCustomExport();return}let e=this.customExportURL,t=`${e.split("/GPServer")?.[0]}/GPServer`;try{let i=await this.getTasksInfo(t),s="",a=i.tasks?.map(async r=>{await this.getTaskType(r,t)==="GetReportTemplatesInfo"&&(s=`${t}/${r}`)});a&&await Promise.all(a),s&&i.executionType&&await this._fetchReportTemplates(s,i.executionType);let o=(await f(e,{authMode:"auto",responseType:"json",query:{f:"json"}}))?.data,c=o.parameters.find(r=>r.name==="Layout_Template"&&Array.isArray(r.choiceList)),n=o.parameters.find(r=>r.name==="Report_Template"&&Array.isArray(r.choiceList));this._layoutTemplates=c?c.choiceList:[];let g=n?n.choiceList:[];this._reportTemplates=this._reportTemplatesInfo.length?g.filter(r=>this._reportTemplatesInfo.some(_=>_.reportTemplate===r)):[]}catch(i){this.resetCustomExport(),console.error(i)}}resetCustomExport(){this._layoutTemplates=[],this._reportTemplates=[],this._segmentType="STANDARD"}async getTaskType(e,t){if(!e||!t)return Promise.resolve("");let i=`${t}/${e}`;try{let s=(await f(i,{authMode:"auto",responseType:"json",query:{f:"json"}}))?.data?.name||"";return Promise.resolve(s)}catch(s){return console.error(s),Promise.resolve("")}}async getTasksInfo(e){if(!e)return Promise.resolve({});let t=`${e}?f=json`,i={authMode:"auto",responseType:"json",query:{f:"json"}};try{let s=(await f(t,i))?.data,a=s?.tasks,o=s?.executionType==="esriExecutionTypeSynchronous"?"execute":"submitJob";return{tasks:a,supportedOperations:o,executionType:s?.executionType}}catch(s){return this.resetCustomExport(),console.error(s),{}}}async _fetchReportTemplates(e,t){if(e)try{if(t==="esriExecutionTypeSynchronous"){let i=(await u.execute(e,{}))?.results?.find(s=>s.paramName==="Output_JSON");this._reportTemplatesInfo=i?.value??[]}else{let i=await u.submitJob(e,{});await i.waitForJobCompletion();let s=await i.fetchResultData("Output_JSON");this._reportTemplatesInfo=s?.value??[]}this._reportTemplatesInfo=this._reportTemplatesInfo.filter(i=>{let s=i.reportOptions;if(s?.reportSectionOverrides){let a=0;return Object.keys(s.reportSectionOverrides).forEach(o=>{s.reportSectionOverrides[o].hasOwnProperty("sourceId")&&a++}),a<=1}else return!0})}catch(i){console.error("Failed to fetch report templates:",i)}}_getExportOptions(){let e=this._exportType==="PDF"?"display-block":"display-none",t=this._addTitle?"display-block":"display-none",i=this._addMap?"display-flex":"display-none",s=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"",a=this._addResults?"":"display-none";return l`<div class=${p(e)}><p class="instructional-text">${this._translations.selectContentTip}</p><div class="padding-top-sides-1 padding-inline-start-0"><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._addResults} @calciteCheckboxChange=${()=>this._addResults=!this._addResults}></calcite-checkbox>${this._translations.addResults}</calcite-label></div><div class=${`indent-group margin-top-1 ${a}`}><div class="margin-bottom-0-5"><calcite-label class="label-margin-0">${this._translations.selectPDFLabelOption}</calcite-label></div><div><pdf-download .defaultNumLabelsPerPage=${Number.parseInt(this.defaultNumLabelsPerPage.toString(),10)} .disabled=${!this._downloadActive} ${h(this._downloadTools)}></pdf-download></div></div><div class="padding-top-sides-1 padding-inline-start-0"><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._addTitle} @calciteCheckboxChange=${()=>this._addTitle=!this._addTitle}></calcite-checkbox>${this._translations.title}</calcite-label></div><div class=${`${t} indent-group margin-top-0-5`}><calcite-input-text class="padding-inline-start-0 padding-top-1-2" @calciteInputTextInput=${()=>this._changeTitle()} .placeholder=${this._translations.titlePlaceholder} .value=${s} ${h(this._titleElement)}></calcite-input-text></div><div class="padding-top-sides-1 padding-inline-start-0"><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._addMap} @calciteCheckboxChange=${()=>this._handleAddMapChange()}></calcite-checkbox>${this._translations.includeMap}</calcite-label></div><div class=${`padding-top-sides-1 padding-inline-start-0 ${i}`}><calcite-label class="label-margin-0" layout=inline><calcite-checkbox .checked=${this._exportGraphics} @calciteCheckboxChange=${()=>this._handleExportGraphicsChange()}></calcite-checkbox>${this._translations.listGraphics}</calcite-label><calcite-icon class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=list-graphics-icon scale=s></calcite-icon><calcite-popover closable label overlay-positioning=fixed reference-element=list-graphics-icon><span class="tooltip-message">${this._translations.listGraphicsTip}</span></calcite-popover></div></div>`}_handleAddMapChange(){this._addMap=!this._addMap,this._updateExportGraphics()}_handleExportGraphicsChange(){this._exportGraphics=!this._exportGraphics,this._updateExportGraphics()}_getManagedLayer(e){let t,i=this._pnStateContextProvider.value;return Object.keys(i.managedLayers).some(s=>{let a=this.mapView?.map.layers.findIndex(o=>o.title===s);return i.managedLayers[s]===e&&a!==void 0?(t=this.mapView?.map.layers.getItemAt(a),!0):!1}),t}_updateExportGraphics(e=!1){(e||!this._exportGraphics||!this._addMap)&&this._removeExportGraphics(),this._exportGraphics&&this._addMap&&this._addExportGraphics()}_removeExportGraphics(){let e=this._getManagedLayer("sketch"),t=this._getManagedLayer("buffer");e&&e.graphics.removeAll(),t&&t.graphics.removeAll()}_addExportGraphics(){let e=this._getManagedLayer("sketch"),t=this._getManagedLayer("buffer");this._refineGraphics.forEach(i=>{e?.add(i.drawnGraphic),t?.add(i.bufferGraphic)}),this._selectionSets.forEach(i=>{if(i.download&&(e&&i.sketchGraphic&&e.graphics.add(i.sketchGraphic),t)){let s={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},a=new A({geometry:i.buffer,symbol:s});a&&t.graphics.add(a)}})}_getRefinePage(){let e=this._hasSelections();return l`<calcite-panel>${this._getLabel(this._translations.refineSelection,!1,"header-label")}${e?l`<div>${this._getNotice(this._translations.refineTip,"padding-sides-1")}<refine-selection .enabledLayerIds=${this.selectionLayerIds} .mapView=${this.mapView} .drawnGraphicsArr=${this._refineGraphics} .selectionSets=${this._selectionSets} .sketchLineSymbol=${this.sketchLineSymbol} .sketchPointSymbol=${this.sketchPointSymbol} .sketchPolygonSymbol=${this.sketchPolygonSymbol} .bufferColor=${this.bufferColor} .bufferOutlineColor=${this.bufferOutlineColor} .defaultBufferDistance=${this.defaultBufferDistance} .defaultBufferUnit=${this.defaultBufferUnit} .enableSearchDistance=${this.enableSearchDistance} .enableSearchDistanceOnLoad=${this.enableSearchDistanceOnLoad} .searchDistanceEnabled=${this.enableSearchDistanceOnLoad} ${h(this._refineSelection)}></refine-selection></div>`:this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1")}</calcite-panel>`}_getPageNavButtons(e,t,i,s,a,o){return l`<div class="padding-bottom-1"><div class="display-flex padding-top-sides-1"><calcite-button .disabled=${t} @click=${i} width=full><span class="font-weight-500">${e}</span></calcite-button></div><div class="display-flex padding-top-1-2 padding-sides-1"><calcite-button appearance=outline .disabled=${a} @click=${o} width=full><span class="font-weight-500">${s}</span></calcite-button></div></div>`}_changeTitle(){this._titleElement.value?.value&&(this._titleValue=this._titleElement.value.value||"")}_getNotice(e,t="padding-1",i=""){return l`<calcite-notice class=${p(t)} icon=lightbulb kind=success open><div class=${p(i)} slot=message>${e}</div></calcite-notice>`}_getLabel(e,t=!1,i="font-bold",s="padding-top-sides-1"){return i+=t?" label-margin-0":"",l`<div class=${p(s)}><calcite-label class=${p(i)}>${e}</calcite-label></div>`}_getExportSelectionLists(){return this._selectionSets.reduce((e,t)=>{let i=this._getSelectionSetIds(t),s=t.workflowType!=="REFINE"||i.length>0;return!this._downloadActive&&t.download&&s&&(this._downloadActive=!0),s&&e.push(l`<div class="display-flex padding-sides-1 padding-bottom-1"><calcite-checkbox .checked=${t.download} class="align-center" @calciteCheckboxChange=${()=>{this._toggleDownload(t.id)}}></calcite-checkbox><calcite-list class="list-border margin-start-1-2 width-full" id=download-list label><calcite-list-item .disabled=${!t.download} .label=${t.label} @click=${()=>{this._toggleDownload(t.id)}}><div slot=content><div class="list-label">${t.label}</div><div class="list-description">${t.layerView?.layer.title}</div><div class="list-description">${this._translations.selectedFeatures.replace("{{n}}",i.length.toString())}</div></div></calcite-list-item></calcite-list></div>`),e},[])||l`<div></div>`}async _toggleDownload(e){let t=!1;this._selectionSets=this._selectionSets.map(i=>{let s=!1;return i.refineInfos&&Object.keys(i.refineInfos).forEach(a=>{i.refineInfos[a].addIds.length&&(s=!0)}),(i.workflowType!=="REFINE"||s)&&(i.download=i.id===e?!i.download:i.download,t=i.download?!0:t),i}),this._updateExportGraphics(!0),this._downloadActive=t,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _standardExport(){let e=this._addResults?this._getSelectionIdsAndViews(this._selectionSets,!0):{};if(this._exportType==="PDF"){let t="";this._addMap&&this.mapView&&(t=(await this.mapView.takeScreenshot({width:1500,height:2e3}))?.dataUrl),this._fetchingData=!0,this._downloadTools.value&&this._removeDuplicates.value&&this.mapView?.map&&await this._downloadTools.value.downloadPDF(this.mapView.map,e,this._removeDuplicates.value.checked,this._addTitle&&this._titleElement.value?this._titleElement.value.value:"",t),this._fetchingData=!1}this._exportType==="CSV"&&(this._fetchingData=!0,this._downloadTools.value&&this.mapView?.map&&await this._downloadTools.value.downloadCSV(this.mapView.map,e,this._removeDuplicates.value?.checked||!1),this._fetchingData=!1)}_getSelectionIdsAndViews(e,t=!1){return(t?e.filter(i=>i.download):e).reduce((i,s)=>{if(s.workflowType==="REFINE")Object.keys(s.refineInfos).forEach(a=>{let o=s.refineInfos[a];if(o.addIds){let c=o.layerView.layer.id;i=this._updateExportInfos(i,c,s.label,o.addIds,o.layerView)}});else{let a=s?.layerView?.layer.id;a!==void 0&&s.layerView&&(i=this._updateExportInfos(i,a,s.label,s.selectedIds,s.layerView))}return i},{})}_updateExportInfos(e,t,i,s,a){return t&&Object.keys(e).indexOf(t)>-1?(e[t].ids=[...new Set([...e[t].ids,...s])],e[t].selectionSetNames.push(i)):t&&(e[t]={ids:s,layerView:a,selectionSetNames:[i]}),e}_getAction(e,t,i,s,a=!1,o=""){return l`<calcite-action appearance=solid .disabled=${!e} .icon=${t} icon-flip-rtl .indicator=${a} @click=${s} slot=${o??m} .text=${i}></calcite-action>`}_updateForSelection(e){this._numSelected=e.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType("LIST")}async _saveSelection(){let e=await this._selectTools.value?.getSelection();if(e){let t=this._selectTools.value?.isUpdate;this._selectionSets=t?this._selectionSets.map(i=>i.id===e.id?e:i):[...this._selectionSets,e]}return this._home()}async _clearSelection(){await this._selectTools.value?.clearSelection(),this._numSelected=0,this._activeSelection=void 0}async _deleteSelection(e,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter((i,s)=>(i.workflowType==="REFINE"&&(this._refineGraphics=[]),s!==e?i:!1)),this._highlightFeatures()}_gotoSelection(e,t){e.selectedIds&&e.layerView&&I(e.selectedIds,e.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(e,t){t.stopPropagation(),this._activeSelection=e,this._pageType=e.workflowType==="REFINE"?"REFINE":"SELECT"}async _highlightFeatures(){let e=this._pnStateContextProvider.value;this._clearHighlight();let t=this._getSelectionIdsAndViews(this._selectionSets,this._pageType==="EXPORT"),i=Object.keys(t);if(i.length>0)for(let s=0;s<i.length;s++){let a=t[i[s]];if(a.layerView&&this.mapView){let o=await C(a.ids,a.layerView,this.mapView);e.highlightHandles.push(o)}}}_checkPopups(){typeof this._popupsEnabled!="boolean"&&(this._popupsEnabled=!!this.mapView?.popupEnabled)}_clearHighlight(){let e=this._pnStateContextProvider.value;e&&e.highlightHandles&&e.removeHandles()}};T("public-notification",y);return y},"Graphic","rest/support/PrintTemplate","rest/support/PrintParameters","rest/print","rest/geoprocessor","request",a,b,c,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import a from"./RTSKNY33.js";import{b as r}from"./PZ4L77M5.js";import{d as u}from"./JE7L7M3J.js";import"./LFIJXE3U.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as l}from"./VU3OQQKP.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"./QRPBAR4V.js";import{b as r}from"./PZ4L77M5.js";import{d as u}from"./JE7L7M3J.js";import"./6LLQFZGG.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"./LI7AOAAS.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)