@arcgis/map-components 6.0.0-next.6 → 6.0.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/43ETXXS2.js +2 -0
- package/dist/cdn/{IDIAWXUO.js → 6XDLG2SC.js} +1 -1
- package/dist/cdn/7HS2SX6W.js +2 -0
- package/dist/cdn/{VOBRCUIE.js → 7ODW3J2D.js} +1 -1
- package/dist/cdn/MSGW4PYB.js +2 -0
- package/dist/cdn/Q3B3NI7P.js +2 -0
- package/dist/cdn/XZDVW553.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-editor/customElement.d.ts +10 -0
- package/dist/components/arcgis-editor/customElement.js +3 -0
- package/dist/components/arcgis-exploratory-analysis/customElement.d.ts +7 -0
- package/dist/components/arcgis-exploratory-analysis/customElement.js +51 -51
- package/dist/components/arcgis-features-next/customElement.js +102 -92
- package/dist/components/arcgis-map/customElement.d.ts +2 -2
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
- package/dist/components/arcgis-popup/customElement.js +26 -22
- package/dist/components/arcgis-time-bar/customElement.js +23 -24
- package/dist/components/arcgis-time-bar-slider/customElement.js +46 -45
- package/dist/components/arcgis-track/customElement.d.ts +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cdn/EZCHUWDK.js +0 -2
- package/dist/cdn/FDJGQHUA.js +0 -2
- package/dist/cdn/LU22VNJ7.js +0 -2
- package/dist/cdn/R5TCWJ6V.js +0 -2
- package/dist/cdn/W6PA72LV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import f from"./XKCB2DEP.js";import{a as Q,b as tt,k as et}from"./IM6IDWYR.js";import e from"./RUYAWRPV.js";import"./WJQUE4DR.js";import d from"./BQBWXR6P.js";import{a as J}from"./ZSPYPXBY.js";import c from"./ALVAGE57.js";import b from"./HPWF3IQV.js";import{f as H,h as U}from"./IFR4IYSI.js";import"./7VDBR3SK.js";import a from"./QPSAD5DG.js";import"./FIZMK7GS.js";import{c as V}from"./ZKWI43WZ.js";import{N as q,O as M,P as B,X as L,a as I,b as p,f as y,p as W,x as j}from"./3UMLR76Y.js";import"./TAVTDQ6S.js";export default $arcgis.t(([pt,f,dt,vt,{convertDateFormatToIntlOptions:E},gt,{getTimeSliderSettingsFromWebDocument:ft},{property:l,subclass:yt},{watch:g,whenOnce:lt},,,,K,{c:X,e:Y,h:G},{a:it,b:st,c:D,d:P,e:at,f:nt,g:ot,h:k,i:rt}])=>{var ct=new WeakMap,ht=new WeakMap;function wt(t){let{locale:e,formatOptions:a}=t,n=_t(a),c=new Intl.DateTimeFormat(e,n);return ct.set(t,c),c}function xt(t){let{locale:e,formatOptions:a}=t,n=new Intl.NumberFormat(e,a);return ht.set(t,n),n}function bt(t){return ct.get(t)??wt(t)}function Et(t){return ht.get(t)??xt(t)}function _t(t){return t.timeZone?{...t,timeZone:et(t.timeZone)}:t}var i=(t,e)=>({tick:t,tickFormat:e}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},Tt=[i({value:10,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},s.sf),i({value:100,unit:"milliseconds"},s.sf),i({value:200,unit:"milliseconds"},s.sf),i({value:500,unit:"milliseconds"},s.sf),i({value:1,unit:"seconds"},s.s),i({value:2,unit:"seconds"},s.s),i({value:5,unit:"seconds"},s.s),i({value:10,unit:"seconds"},s.s),i({value:20,unit:"seconds"},s.ms),i({value:30,unit:"seconds"},s.ms),i({value:1,unit:"minutes"},s.mi),i({value:2,unit:"minutes"},s.mi),i({value:5,unit:"minutes"},s.mi),i({value:10,unit:"minutes"},s.mi),i({value:30,unit:"minutes"},s.hm),i({value:1,unit:"hours"},s.hm),i({value:2,unit:"hours"},s.hm),i({value:4,unit:"hours"},s.hm),i({value:8,unit:"hours"},s.hm),i({value:1,unit:"days"},s.dm),i({value:1,unit:"days"},s.dm),i({value:2,unit:"days"},s.dm),i({value:4,unit:"days"},s.dm),i({value:10,unit:"days"},s.dm),i({value:15,unit:"days"},s.dm),i({value:20,unit:"days"},s.dm),i({value:1,unit:"months"},s.m),i({value:3,unit:"months"},s.m),i({value:6,unit:"months"},s.my),i({value:1,unit:"years"},s.y),i({value:2,unit:"years"},s.y),i({value:4,unit:"years"},s.y),i({value:10,unit:"years"},s.y),i({value:20,unit:"years"},s.y),i({value:50,unit:"years"},s.y),i({value:100,unit:"years"},s.y),i({value:200,unit:"years"},s.y),i({value:500,unit:"years"},s.y),i({value:10,unit:"centuries"},s.y),i({value:20,unit:"centuries"},s.y),i({value:50,unit:"centuries"},s.y),i({value:100,unit:"centuries"},s.y),i({value:200,unit:"centuries"},s.y),i({value:500,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},s.y),i({value:2e3,unit:"centuries"},s.y),i({value:5e3,unit:"centuries"},s.y),i({value:1e4,unit:"centuries"},s.y),i({value:2e4,unit:"centuries"},s.y)];function St(t){return Tt.map(({tick:e,tickFormat:a})=>{let n=new gt(e),c=n.toMilliseconds(),h={...a,timeZone:t};return{duration:c,format:h,timeInterval:n}})}var $t=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,mt=t=>{throw TypeError(t)},r=(t,e,a,n)=>{for(var c=n>1?void 0:n?Mt(e,a):e,h=t.length-1,d;h>=0;h--)(d=t[h])&&(c=(n?d(e,a,c):d(c))||c);return n&&c&&$t(e,a,c),c},N=(t,e,a)=>e.has(t)||mt("Cannot "+a),_=(t,e,a)=>(N(t,e,"read from private field"),a?a.call(t):e.get(t)),Z=(t,e,a)=>e.has(t)?mt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),Dt=(t,e,a,n)=>(N(t,e,"write to private field"),e.set(t,a),a),u=(t,e,a)=>(N(t,e,"access private method"),a),w,T,m,F,O,A,R,x,S,C,o=class extends pt{constructor(){super(...arguments),Z(this,m),Z(this,w,new AbortController),Z(this,T,!1),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.reverseAnimation=!1,this.savePersistedSettingsDisabled=!1,this.stops=it}get _adjustedTickFormat(){let{era:t,timeZone:e}=this;return{...this.tickFormat,era:this.tickFormat?.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),...E("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _thumbStopIndices(){let{_thumbPositions:t,effectiveStopsEpoch:e}=this;return!t||!e?null:t.map(a=>{let n=e.indexOf(a);if(n!==-1)return n;let c=e.reduce((h,d)=>Math.abs(d-a)<Math.abs(h-a)?d:h);return e.indexOf(c)})}get _timeFormat(){let{timeZone:t}=this;return{...E("long-time"),timeZone:t}}get canPrevious(){return this._thumbStopIndices?.map(t=>--t).every(t=>u(this,m,A).call(this,t))??!1}get canNext(){return this._thumbStopIndices?.map(t=>++t).every(t=>u(this,m,A).call(this,t))??!1}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if(P(e)){let{dates:n}=e;if(!n?.length)return;let c=n.sort(($,b)=>$.getTime()-b.getTime());if(!t?.start||!t?.end)return c;let{start:h,end:d}=t,v=h.getTime(),ut=d.getTime();return c.filter($=>{let b=$.getTime();return b>=v&&b<=ut})}let a=e.timeExtent??t;if(a)return D(e)?nt(a,e.count):ot(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled"||this.timeZone===tt)}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:n}=e??{};if(!a||!n||!t||t.isAllTime||t.isEmpty)return!0;let{start:c,end:h}=t??{},d=c!=null&&(c<a||c>n),v=h!=null&&(h>n||h<a);return d||v}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&u(this,m,R).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormatter(){return t=>this._formatDate(t,this._adjustedTickFormat)}get tickFormats(){return St(this.timeZone)}get timeZone(){return this._userTimeZone??this.viewTimeZone??Q}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.timeZone}destroy(){_(this,w).abort(),this.view?.unregisterComponent(this),u(this,m,S).call(this)}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}getTickValues(t){let{fullTimeExtent:e,timeZone:a}=this;if(!e)return[];let{start:n,end:c}=e;return!n||!c?[]:rt(n,c,t,a).map(h=>h.getTime())}async initialize(){this.addHandles([g(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=k(t,this.mode))},{initial:!0}),g(()=>this.timeExtent,t=>{!this.view||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(this.view.timeExtent=t)},{initial:!0}),g(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),g(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),g(()=>this.view?.timeExtent,t=>{if(this.view){if(!_(this,T)){Dt(this,T,!0);return}(!t||t.isAllTime)&&(!this.timeExtent||this.timeExtent.isAllTime)||t&&this.timeExtent&&t.equals(this.timeExtent)||(this.timeExtent=t??void 0)}}),g(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new f({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await Y((async()=>{if(await lt(()=>this.view?.ready,{signal:_(this,w).signal}),this.loadPersistedSettingsDisabled)return;let t=await ft(this.view?.map,_(this,w).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){u(this,m,x).call(this,{forward:!0,allowRestart:!1})}play(){u(this,m,R).call(this)}previous(){u(this,m,x).call(this,{forward:!1,allowRestart:!1})}stop(){u(this,m,S).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new dt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:D(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:at(this.stops)?this.stops.interval:null,stops:P(this.stops)?this.stops.dates:null});t.widgets??=new vt,t.widgets.timeSlider=e}_formatDate(t,e){return bt({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return Et({locale:this.locale,formatOptions:e}).format(t)}};w=new WeakMap;T=new WeakMap;m=new WeakSet;F=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([G(this.playRate,e),t&<(()=>!t.updating,e)])}catch(t){X(t)||W("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}u(this,m,x).call(this,{forward:!this.reverseAnimation,allowRestart:!1}),this._animationController&&u(this,m,F).call(this)};O=function(t){return t?this.canNext:this.canPrevious};A=function(t){return t>=0&&t<(this.effectiveStopsEpoch?.length??0)};R=function(){u(this,m,S).call(this),this._animationController=new AbortController,u(this,m,x).call(this,{forward:!this.reverseAnimation,allowRestart:!0}),u(this,m,F).call(this)};x=function({forward:t,allowRestart:e}){let{_thumbStopIndices:a,effectiveStopsEpoch:n}=this;if(!(!a||!n))if(u(this,m,O).call(this,t)){let c=a.map(h=>h+(t?1:-1)).map(h=>n[h]);this.timeExtent=u(this,m,C).call(this,c),!this.loop&&!u(this,m,O).call(this,t)&&this.stop()}else if(this.loop||e){let c=Math.min(...a),h=Math.max(...a),d=(t?a.map(v=>v-c):a.map(v=>v+(n.length-1-h))).map(v=>n[v]);this.timeExtent=u(this,m,C).call(this,d)}else this.stop()};S=function(){this._animationController?.abort(),this._animationController=void 0};C=function(t){if(!t)return;let e=[...t].sort((a,n)=>a-n).map(a=>new Date(a));return k(e,this.mode)};r([l()],o.prototype,"_adjustedTickFormat",1);r([l()],o.prototype,"_animationController",2);r([l()],o.prototype,"_dateFormat",1);r([l()],o.prototype,"_dateTimeFormat",1);r([l()],o.prototype,"_thumbPositions",1);r([l()],o.prototype,"_thumbStopIndices",1);r([l()],o.prototype,"_timeFormat",1);r([l()],o.prototype,"_userTimeZone",2);r([l()],o.prototype,"canPrevious",1);r([l()],o.prototype,"canNext",1);r([l()],o.prototype,"disabled",2);r([l()],o.prototype,"effectiveStops",1);r([l()],o.prototype,"effectiveStopsEpoch",1);r([l()],o.prototype,"era",1);r([l()],o.prototype,"format",2);r([l({type:f})],o.prototype,"fullTimeExtent",2);r([l()],o.prototype,"interactive",1);r([l()],o.prototype,"isOutOfRange",1);r([l()],o.prototype,"loadPersistedSettingsDisabled",2);r([l()],o.prototype,"locale",2);r([l()],o.prototype,"loop",2);r([l()],o.prototype,"mode",2);r([l({value:1e3})],o.prototype,"playRate",1);r([l()],o.prototype,"reverseAnimation",2);r([l()],o.prototype,"savePersistedSettingsDisabled",2);r([l()],o.prototype,"state",1);r([l({cast:st})],o.prototype,"stops",2);r([l()],o.prototype,"tickFormat",2);r([l()],o.prototype,"tickFormatter",1);r([l()],o.prototype,"tickFormats",1);r([l({type:f})],o.prototype,"timeExtent",2);r([l()],o.prototype,"timeZone",1);r([l()],o.prototype,"view",2);r([l()],o.prototype,"viewTimeZone",1);o=r([yt("components.time-bar.TimeBarViewModel")],o);var Pt=I`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-view-corner-radius: var(--arcgis-view-corner-radius, 0px);--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}:host([floating]) .action-bar{--calcite-action-bar-shadow: var(--arcgis-internal-box-shadow)}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: none;--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`,kt=K(o),z=class extends B{constructor(){super(...arguments),this._viewModel=kt(this),this.messages=J({name:"time-bar",blocking:!0}),this.#t=q(),this.#e=H(),this.#i=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.floating=!1,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.reverseAnimation=this._viewModel.reverseAnimation,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.showTimeExtent=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=U()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=j()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,floating:7,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,reverseAnimation:5,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,showTimeExtent:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=Pt}#t;#e;#i;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#m(e){let{currentTarget:a}=e,n=V(a).at(0)??a.querySelector("arcgis-time-bar-extent");n&&(n.messages=this.messages,n.viewModel=this._viewModel)}async#u(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return p`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-toggle-disabled .floating=${this.floating} overflow-mode=none>${this.#e==="ltr"?p`${this.#s()}${this.#n()}${this.#h()}${this.#c()}${this.#a()}`:p`${this.#s()}${this.#c()}${this.#h()}${this.#n()}${this.#a()}`}</calcite-action-bar></div>`}#s(){return this.showNext||this.showPlay||this.showPrevious||this.showTimeExtent||this.showSettings?null:p`<calcite-action disabled .text=${this.messages.componentLabel} text-enabled></calcite-action>`}#a(){return p`<slot name=actions-end slot=actions-end></slot>`}#n(){return this.showPrevious||this.showPlay||this.showNext?p`<calcite-action-group>${this.#e==="ltr"?p`${this.#r()}${this.#l()}${this.#o()}`:p`${this.#o()}${this.#l()}${this.#r()}`}</calcite-action-group>`:null}#o(){return this.showNext?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canNext} icon=forward @click=${this.next} .text=${this.messages.next} title=${this.messages.next??y}></calcite-action>`:null}#r(){return this.showPlay?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#u} .text=${this.state==="playing"?this.messages.stop:this.messages.play} title=${(this.state==="playing"?this.messages.stop:this.messages.play)??y}></calcite-action>`:null}#l(){return this.showPrevious?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canPrevious} icon=reverse @click=${this.previous} .text=${this.messages.previous} title=${this.messages.previous??y}></calcite-action>`:null}#c(){return this.showSettings?p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings??y} ${M(this.#i)}></calcite-action>${this._settingsActionElement?p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings .autoDestroyDisabled=${this.autoDestroyDisabled} class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#h(){return this.showTimeExtent?p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} class="label" .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`:null}};L("arcgis-time-bar",z);return z},"core/Accessor","time/TimeExtent","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,d,e,f)
|
|
2
|
+
import f from"./XKCB2DEP.js";import{a as Q,b as tt,k as et}from"./IM6IDWYR.js";import e from"./RUYAWRPV.js";import"./WJQUE4DR.js";import d from"./BQBWXR6P.js";import{a as J}from"./ZSPYPXBY.js";import c from"./ALVAGE57.js";import b from"./HPWF3IQV.js";import{f as H,h as U}from"./IFR4IYSI.js";import"./7VDBR3SK.js";import a from"./QPSAD5DG.js";import"./FIZMK7GS.js";import{c as V}from"./ZKWI43WZ.js";import{N as q,O as M,P as B,X as L,a as I,b as p,f as y,p as W,x as j}from"./3UMLR76Y.js";import"./TAVTDQ6S.js";export default $arcgis.t(([pt,f,dt,vt,{convertDateFormatToIntlOptions:E},gt,{getTimeSliderSettingsFromWebDocument:ft},{property:l,subclass:yt},{watch:g,whenOnce:lt},,,,K,{c:X,e:Y,h:G},{a:it,b:st,c:D,d:P,e:at,f:nt,g:ot,h:k,i:rt}])=>{var ct=new WeakMap,ht=new WeakMap;function wt(t){let{locale:e,formatOptions:a}=t,n=_t(a),c=new Intl.DateTimeFormat(e,n);return ct.set(t,c),c}function xt(t){let{locale:e,formatOptions:a}=t,n=new Intl.NumberFormat(e,a);return ht.set(t,n),n}function bt(t){return ct.get(t)??wt(t)}function Et(t){return ht.get(t)??xt(t)}function _t(t){return t.timeZone?{...t,timeZone:et(t.timeZone)}:t}var i=(t,e)=>({tick:t,tickFormat:e}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},Tt=[i({value:10,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},s.sf),i({value:100,unit:"milliseconds"},s.sf),i({value:200,unit:"milliseconds"},s.sf),i({value:500,unit:"milliseconds"},s.sf),i({value:1,unit:"seconds"},s.s),i({value:2,unit:"seconds"},s.s),i({value:5,unit:"seconds"},s.s),i({value:10,unit:"seconds"},s.s),i({value:20,unit:"seconds"},s.ms),i({value:30,unit:"seconds"},s.ms),i({value:1,unit:"minutes"},s.mi),i({value:2,unit:"minutes"},s.mi),i({value:5,unit:"minutes"},s.mi),i({value:10,unit:"minutes"},s.mi),i({value:30,unit:"minutes"},s.hm),i({value:1,unit:"hours"},s.hm),i({value:2,unit:"hours"},s.hm),i({value:4,unit:"hours"},s.hm),i({value:8,unit:"hours"},s.hm),i({value:1,unit:"days"},s.dm),i({value:1,unit:"days"},s.dm),i({value:2,unit:"days"},s.dm),i({value:4,unit:"days"},s.dm),i({value:10,unit:"days"},s.dm),i({value:15,unit:"days"},s.dm),i({value:20,unit:"days"},s.dm),i({value:1,unit:"months"},s.m),i({value:3,unit:"months"},s.m),i({value:6,unit:"months"},s.my),i({value:1,unit:"years"},s.y),i({value:2,unit:"years"},s.y),i({value:4,unit:"years"},s.y),i({value:10,unit:"years"},s.y),i({value:20,unit:"years"},s.y),i({value:50,unit:"years"},s.y),i({value:100,unit:"years"},s.y),i({value:200,unit:"years"},s.y),i({value:500,unit:"years"},s.y),i({value:10,unit:"centuries"},s.y),i({value:20,unit:"centuries"},s.y),i({value:50,unit:"centuries"},s.y),i({value:100,unit:"centuries"},s.y),i({value:200,unit:"centuries"},s.y),i({value:500,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},s.y),i({value:2e3,unit:"centuries"},s.y),i({value:5e3,unit:"centuries"},s.y),i({value:1e4,unit:"centuries"},s.y),i({value:2e4,unit:"centuries"},s.y)];function St(t){return Tt.map(({tick:e,tickFormat:a})=>{let n=new gt(e),c=n.toMilliseconds(),h={...a,timeZone:t};return{duration:c,format:h,timeInterval:n}})}var $t=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,mt=t=>{throw TypeError(t)},r=(t,e,a,n)=>{for(var c=n>1?void 0:n?Mt(e,a):e,h=t.length-1,d;h>=0;h--)(d=t[h])&&(c=(n?d(e,a,c):d(c))||c);return n&&c&&$t(e,a,c),c},N=(t,e,a)=>e.has(t)||mt("Cannot "+a),_=(t,e,a)=>(N(t,e,"read from private field"),a?a.call(t):e.get(t)),Z=(t,e,a)=>e.has(t)?mt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),Dt=(t,e,a,n)=>(N(t,e,"write to private field"),e.set(t,a),a),u=(t,e,a)=>(N(t,e,"access private method"),a),w,T,m,F,O,A,R,x,S,C,o=class extends pt{constructor(){super(...arguments),Z(this,m),Z(this,w,new AbortController),Z(this,T,!1),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.reverseAnimation=!1,this.savePersistedSettingsDisabled=!1,this.stops=it}get _adjustedTickFormat(){let{era:t,timeZone:e}=this;return{...this.tickFormat,era:this.tickFormat?.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),...E("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _thumbStopIndices(){let{_thumbPositions:t,effectiveStopsEpoch:e}=this;return!t||!e?null:t.map(a=>{let n=e.indexOf(a);if(n!==-1)return n;let c=e.reduce((h,d)=>Math.abs(d-a)<Math.abs(h-a)?d:h);return e.indexOf(c)})}get _timeFormat(){let{timeZone:t}=this;return{...E("long-time"),timeZone:t}}get canPrevious(){return this._thumbStopIndices?.map(t=>--t).every(t=>u(this,m,A).call(this,t))??!1}get canNext(){return this._thumbStopIndices?.map(t=>++t).every(t=>u(this,m,A).call(this,t))??!1}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if(P(e)){let{dates:n}=e;if(!n?.length)return;let c=n.sort(($,b)=>$.getTime()-b.getTime());if(!t?.start||!t?.end)return c;let{start:h,end:d}=t,v=h.getTime(),ut=d.getTime();return c.filter($=>{let b=$.getTime();return b>=v&&b<=ut})}let a=e.timeExtent??t;if(a)return D(e)?nt(a,e.count):ot(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled"||this.timeZone===tt)}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:n}=e??{};if(!a||!n||!t||t.isAllTime||t.isEmpty)return!0;let{start:c,end:h}=t??{},d=c!=null&&(c<a||c>n),v=h!=null&&(h>n||h<a);return d||v}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&u(this,m,R).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormatter(){return t=>this._formatDate(t,this._adjustedTickFormat)}get tickFormats(){return St(this.timeZone)}get timeZone(){return this._userTimeZone??this.viewTimeZone??Q}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.timeZone}destroy(){_(this,w).abort(),this.view?.unregisterComponent(this),u(this,m,S).call(this)}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}getTickValues(t){let{fullTimeExtent:e,timeZone:a}=this;if(!e)return[];let{start:n,end:c}=e;return!n||!c?[]:rt(n,c,t,a).map(h=>h.getTime())}async initialize(){this.addHandles([g(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=k(t,this.mode))},{initial:!0}),g(()=>this.timeExtent,t=>{!this.view||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(this.view.timeExtent=t)},{initial:!0}),g(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),g(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),g(()=>this.view?.timeExtent,t=>{if(this.view){if(!_(this,T)){Dt(this,T,!0);return}(!t||t.isAllTime)&&(!this.timeExtent||this.timeExtent.isAllTime)||t&&this.timeExtent&&t.equals(this.timeExtent)||(this.timeExtent=t??void 0)}}),g(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new f({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await Y((async()=>{if(await lt(()=>this.view?.ready,{signal:_(this,w).signal}),this.loadPersistedSettingsDisabled)return;let t=await ft(this.view?.map,_(this,w).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){u(this,m,x).call(this,{forward:!0,allowRestart:!1})}play(){u(this,m,R).call(this)}previous(){u(this,m,x).call(this,{forward:!1,allowRestart:!1})}stop(){u(this,m,S).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new dt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:D(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:at(this.stops)?this.stops.interval:null,stops:P(this.stops)?this.stops.dates:null});t.widgets??=new vt,t.widgets.timeSlider=e}_formatDate(t,e){return bt({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return Et({locale:this.locale,formatOptions:e}).format(t)}};w=new WeakMap;T=new WeakMap;m=new WeakSet;F=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([G(this.playRate,e),t&<(()=>!t.updating,e)])}catch(t){X(t)||W("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}u(this,m,x).call(this,{forward:!this.reverseAnimation,allowRestart:!1}),this._animationController&&u(this,m,F).call(this)};O=function(t){return t?this.canNext:this.canPrevious};A=function(t){return t>=0&&t<(this.effectiveStopsEpoch?.length??0)};R=function(){u(this,m,S).call(this),this._animationController=new AbortController,u(this,m,x).call(this,{forward:!this.reverseAnimation,allowRestart:!0}),u(this,m,F).call(this)};x=function({forward:t,allowRestart:e}){let{_thumbStopIndices:a,effectiveStopsEpoch:n}=this;if(!(!a||!n))if(u(this,m,O).call(this,t)){let c=a.map(h=>h+(t?1:-1)).map(h=>n[h]);this.timeExtent=u(this,m,C).call(this,c),!this.loop&&!u(this,m,O).call(this,t)&&this.stop()}else if(this.loop||e){let c=Math.min(...a),h=Math.max(...a),d=(t?a.map(v=>v-c):a.map(v=>v+(n.length-1-h))).map(v=>n[v]);this.timeExtent=u(this,m,C).call(this,d)}else this.stop()};S=function(){this._animationController?.abort(),this._animationController=void 0};C=function(t){if(!t)return;let e=[...t].sort((a,n)=>a-n).map(a=>new Date(a));return k(e,this.mode)};r([l()],o.prototype,"_adjustedTickFormat",1);r([l()],o.prototype,"_animationController",2);r([l()],o.prototype,"_dateFormat",1);r([l()],o.prototype,"_dateTimeFormat",1);r([l()],o.prototype,"_thumbPositions",1);r([l()],o.prototype,"_thumbStopIndices",1);r([l()],o.prototype,"_timeFormat",1);r([l()],o.prototype,"_userTimeZone",2);r([l()],o.prototype,"canPrevious",1);r([l()],o.prototype,"canNext",1);r([l()],o.prototype,"disabled",2);r([l()],o.prototype,"effectiveStops",1);r([l()],o.prototype,"effectiveStopsEpoch",1);r([l()],o.prototype,"era",1);r([l()],o.prototype,"format",2);r([l({type:f})],o.prototype,"fullTimeExtent",2);r([l()],o.prototype,"interactive",1);r([l()],o.prototype,"isOutOfRange",1);r([l()],o.prototype,"loadPersistedSettingsDisabled",2);r([l()],o.prototype,"locale",2);r([l()],o.prototype,"loop",2);r([l()],o.prototype,"mode",2);r([l({value:1e3})],o.prototype,"playRate",1);r([l()],o.prototype,"reverseAnimation",2);r([l()],o.prototype,"savePersistedSettingsDisabled",2);r([l()],o.prototype,"state",1);r([l({cast:st})],o.prototype,"stops",2);r([l()],o.prototype,"tickFormat",2);r([l()],o.prototype,"tickFormatter",1);r([l()],o.prototype,"tickFormats",1);r([l({type:f})],o.prototype,"timeExtent",2);r([l()],o.prototype,"timeZone",1);r([l()],o.prototype,"view",2);r([l()],o.prototype,"viewTimeZone",1);o=r([yt("components.time-bar.TimeBarViewModel")],o);var Pt=I`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-view-corner-radius: var(--arcgis-view-corner-radius, 0px);--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}:host([floating]) .action-bar{--calcite-action-bar-shadow: var(--arcgis-internal-box-shadow)}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: none;--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`,kt=K(o),z=class extends B{constructor(){super(...arguments),this._direction=H(),this._viewModel=kt(this),this.messages=J({name:"time-bar",blocking:!0}),this.#t=q(),this.#e=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.floating=!1,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.reverseAnimation=this._viewModel.reverseAnimation,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.showTimeExtent=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=U()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=j()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,floating:7,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,reverseAnimation:5,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,showTimeExtent:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=Pt}#t;#e;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#h(e){let{currentTarget:a}=e,n=V(a).at(0)??a.querySelector("arcgis-time-bar-extent");n&&(n.messages=this.messages,n.viewModel=this._viewModel)}async#m(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return p`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-toggle-disabled .floating=${this.floating} overflow-mode=none>${this._direction==="ltr"?p`${this.#i()}${this.#a()}${this.#c()}${this.#l()}${this.#s()}`:p`${this.#i()}${this.#l()}${this.#c()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#i(){return this.showNext||this.showPlay||this.showPrevious||this.showTimeExtent||this.showSettings?null:p`<calcite-action disabled .text=${this.messages.componentLabel} text-enabled></calcite-action>`}#s(){return p`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?p`<calcite-action-group>${this._direction==="ltr"?p`${this.#o()}${this.#r()}${this.#n()}`:p`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canNext} icon=forward @click=${this.next} .text=${this.messages.next} title=${this.messages.next??y}></calcite-action>`:null}#o(){return this.showPlay?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#m} .text=${this.state==="playing"?this.messages.stop:this.messages.play} title=${(this.state==="playing"?this.messages.stop:this.messages.play)??y}></calcite-action>`:null}#r(){return this.showPrevious?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canPrevious} icon=reverse @click=${this.previous} .text=${this.messages.previous} title=${this.messages.previous??y}></calcite-action>`:null}#l(){return this.showSettings?p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings??y} ${M(this.#e)}></calcite-action>${this._settingsActionElement?p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings .autoDestroyDisabled=${this.autoDestroyDisabled} class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#c(){return this.showTimeExtent?p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#h}><arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} class="label" .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`:null}};L("arcgis-time-bar",z);return z},"core/Accessor","time/TimeExtent","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,d,e,f)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import l from"./Z2UUXST4.js";import{a as k}from"./PIDNZKSJ.js";import j from"./WBBTZNZU.js";import i from"./HU57LQOA.js";import h from"./RUYAWRPV.js";import{a as T}from"./WJQUE4DR.js";import{b as V,c as Z,d as U}from"./366GLQ5R.js";import e from"./BQBWXR6P.js";import{a as B}from"./ZSPYPXBY.js";import d from"./ALVAGE57.js";import c from"./HPWF3IQV.js";import{f as H,h as P}from"./IFR4IYSI.js";import"./7VDBR3SK.js";import a from"./QPSAD5DG.js";import"./FIZMK7GS.js";import{a as D,e as b}from"./ZKWI43WZ.js";import{N as f,O as m,P as L,R as $,U as g,V as O,X as N,a as S,b as n,n as x,x as C}from"./3UMLR76Y.js";import"./TAVTDQ6S.js";export default $arcgis.t(([X,W,J,{initializeProjection:Q},{renderingSanitizer:M},{stripHTML:A},{substitute:h,formatNumber:I},{when:Y,watch:u},{getGraphicOriginTitle:ee},,,,z,,,{e:E},{d:j}])=>{var te=S`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{flex:0 0 1px;height:1px;margin-block-start:-1px}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}.diagnostics-notice{padding:var(--calcite-space-md)}`;function ie(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function se(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var ae=z(J),ne=25,oe=5,R=class extends L{constructor(){super(...arguments),this._zoomToFeature=new X({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this._loadMoreFeatures()},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=f(),this._featureMenuViewportNode=f(),this._actionBarMenuNode=f(),this._flowContainerNode=f(),this._aggregatedFeaturesComponent=f(),this.messages=B(),this._selectedFeatureComponent=f(),this._actionFlowItems=new WeakSet,this._direction=H(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=T(this._openRelatedFeatureAbortController)},this._spinnerVisible=!1,this._spinnerVisibilityTimeout=null,this._openRelatedFeatureAbortController=null,this.flowItems=new W,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=ae(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.diagnostics=this.viewModel.diagnostics,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new W,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisClose=C(),this.arcgisPropertyChange=P()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=C(),this.arcgisTriggerAction=C()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_selectedFeatureHeadingText:16,_selectedFeatureContent:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,diagnostics:0,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=te}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this._selectedFeatureHeading)&&!!(this.content||this._selectedFeatureContent))}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _selectedFeatureHeadingText(){return this._selectedFeatureHeading||(this.viewModel.selectedFeatureItem?.state==="loading"?this.messages.loading:this.messages.untitled)}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelSetFocusAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:i}=t??{},s=new AbortController,{signal:a}=s,o=i?AbortSignal.any([a,i]):a;this._fetchFeaturesController=s,!e&&this.view&&this.location&&(await Q(this.location.spatialReference,this.view.spatialReference,null,{signal:o}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:o})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&x(()=>this.selectedFeatureComponent=e),this.componentOnReady().then(()=>{let t=this._featureMenuIntersectionObserverNode;this.isConnected&&t&&(this._featureMenuIntersectionObserver.unobserve(t),this._featureMenuIntersectionObserver.observe(t))})}loaded(){this.manager.onLifecycle(()=>[Y(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>{this.setFocus()}),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),u(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>[this.viewModel?.features.at(0),this.viewModel?.featureCount??0],([e,t],i)=>{let[s,a]=i??[void 0,0];(e!==s||t<a)&&this._featureMenuViewportScrollTop()}),u(()=>[this.featureMenuOpen,this.initialDisplayMode,this.open],()=>{this.viewModel.featureMenuOpen=this.featureMenuOpen,this.open&&(this.featureMenuOpen||this.initialDisplayMode==="list")&&(this.viewModel.featurePage=1)},{initial:!0}),u(()=>this.flowItems.toArray(),()=>this._handleFlowItemsChange(),{initial:!0}),u(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),u(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.pendingLocation,this.viewModel?.waitingForResult,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._clearSpinnerVisibilityTimeout(),this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}_loadMoreFeatures(){let{viewModel:e}=this,{featurePage:t,featuresPerPage:i,features:s}=e;e.open&&(this.initialDisplayMode==="list"||this.featureMenuOpen)&&t!=null&&t*i<s.length&&(e.featurePage=t+1)}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=T(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{features:e,featurePage:t,featuresPerPage:i}=this.viewModel,s=new Map,a=Math.min((t??0)*i,e.length);for(let o=0;o<a;o++){let r=e[o],l=E(r),d=ie(l)?l:null,c=s.get(d);c||(c=[],s.set(d,c)),c.push(o)}return s}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let i=e.graphic,s=i?.geometry;if(s==null||i==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:s}),t.signal.aborted)return;let{labelPointExecute:a}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let o=a(s);o!=null&&(this.location=o),this.features=[i],this.open=!0,this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"&&this._handleFeatureMenuBack()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){e!==this._featureMenuIntersectionObserverNode&&(this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserverNode=e??null)}_getActionLabel(e,t){let{messages:i}=this;if(e.id==="zoom-to-feature"){let s=t?A(t.heading||(("state"in t&&t.state==="loading"?i.loading:i.untitled)??"")):this._selectedFeatureHeadingText;return h(i.zoomLabel??"",{messages:i,title:s})}return null}_getActionTitle(e,t){let{messages:i}=this,s=t?t.graphic:this.selectedFeature,{id:a}=e,o=s?.attributes,r=e.title??"",l=a==="zoom-to-feature"?h(r,{messages:i}):a==="remove-selected-feature"?h(r,{messages:i}):a==="zoom-to-aggregated-features"?h(r,{messages:i}):a==="browse-aggregated-features"?h(r,{messages:i}):e.title;return l&&o?h(l,o):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||V(e)||(U(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.previous()),Z(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._closeFeatureMenu(),this.next()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:i,waitingForResult:s}=this.viewModel;s||!i||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e,t=this.flowItems.getItemAt(this.flowItems.length-1)){if(e.disabled)return;e?.type==="toggle"&&(e.value=!e.value);let i=t&&"allActions"in t?t.viewModel:void 0;j(e,this.viewModel,i),this.arcgisTriggerAction.emit({action:e})}_viewScaleChange(){let{selectedFeature:e}=this,t=E(e);!e?.isAggregate||se(t)!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_handleFlowItemsChange(){this._syncSelectedDrillInFeature(),this.flowItems.forEach(e=>{!("allActions"in e)||this._actionFlowItems.has(e)||(this._actionFlowItems.add(e),e.componentOnReady().then(()=>{this.isConnected&&this.flowItems.includes(e)&&this.requestUpdate()}))})}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);x(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=D(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=D(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_clearSpinnerVisibilityTimeout(){this._spinnerVisibilityTimeout!=null&&(clearTimeout(this._spinnerVisibilityTimeout),this._spinnerVisibilityTimeout=null)}_getSpinnerTrackLocation(){return!this.hideSpinner&&this.viewModel.open&&this.viewModel?.waitingForResult?this._spinnerVisible?!0:(this._spinnerVisibilityTimeout??=setTimeout(()=>{this._spinnerVisibilityTimeout=null,this._spinnerVisible=!0,this._createSpinner()},ne),!1):(this._clearSpinnerVisibilityTimeout(),this._spinnerVisible=!1,!1)}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=O(n`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${this._getSpinnerTrackLocation()} .location=${this.viewModel?.pendingLocation??this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}#e(e){let t=e&&"allActions"in e?e:void 0,{selectedFeatureItem:i}=this.viewModel;if(t&&!t.allActions)return[];let s=t?t.isFeatureFromTable:i?.isFeatureFromTable;return(t?.allActions??i?.allActions??(!e&&this.viewModel.includeDefaultActions?this.viewModel.defaultActions.concat(this.viewModel.actions):this.viewModel.actions)).toArray().filter(a=>!(e&&a.id==="browse-aggregated-features")&&!(s&&!this.location&&a.id===this._zoomToFeature.id))}render(){return n`<div class="root">${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?n`<div slot=header-top class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?n`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:i}=this;return n`<div class="pagination-text">${h(i.pageText??"",{index:I(t+1),total:I(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:i,streamingFeatures:s,selectedFeatureIndex:a}=t;return n`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${s} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:I(a+1),total:I(i)})} text-enabled title=${e.showAllFeatures??""??g}></calcite-action>`}_renderPagination(e,t){let{previous:i,next:s}=this.messages;return n`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${i??""} @click=${e} .text=${i??""} title=${i??""??g}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${s??""} @click=${t} .text=${s??""} title=${s??""??g}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e){let{initialDisplayMode:t}=this,{featureModels:i,selectedFeatureIndex:s}=this.viewModel,a=i[e],o=e===s;return n`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(e)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(e)} .selected=${o} @calciteListItemSelect=${()=>this._selectFeature(e)}><span .innerHTML=${(M.sanitize(a?.heading??"")||(a?.state==="loading"?this.messages.loading:this.messages.untitled))??""} slot=content></span>${t==="list"?n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,i=this._groupResultsByLayer(),s=this.initialDisplayMode==="list"?"none":"single";return t.features.length?n`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(i,([a,o])=>{let r=o.map(d=>this._renderFeatureMenuItem(d)),l=a?a.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?k(a??"map-graphics",n`<calcite-list-item-group .heading=${l}>${r}</calcite-list-item-group>`):r})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?n`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??g}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:i,_isCollapsed:s,_collapseEnabled:a,featureNavigationTop:o,initialDisplayMode:r,selectedFeature:l,hideHeading:d}=this,{active:c,selectedFeatureItem:v,content:F}=this.viewModel,p=this._getHeading();if(r==="list"&&!l)return null;let w=v?!v.content:!F;return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${$(b({"content-feature":!0,"flow-item-collapsed":s}))} .closable=${!i} .closed=${!c} .collapsed=${s} .collapseDirection=${this.collapseDirection??(o?"down":"up")} .collapsible=${a} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d&&p?A(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?n`<div slot=heading><div .innerHTML=${M.sanitize(p??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${$(b("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderDiagnosticsRefineResults(){let{messages:e}=this,{view:t}=this.viewModel;return t!=null&&"effectiveMaxZoom"in t.constraints&&t.constraints.effectiveMaxZoom>=0&&t.zoom>=t.constraints.effectiveMaxZoom?e.maxRecordCountDescriptionRefineResultsMaxZoomLevel:e.maxRecordCountDescriptionRefineResults}_renderDiagnosticsList(e){let{messages:t}=this,i=Array.from(e,s=>ee(s)??t.untitled);return i.length?n`<p>${t.maxRecordCountDescriptionWithLayerList}</p><ul>${i.map(s=>n`<li>${s}</li>`)}</ul><p>${this._renderDiagnosticsRefineResults()}</p>`:null}_renderDiagnosticsMultipleLayers(){let{messages:e}=this;return n`<p>${e.maxRecordCountDescriptionMultipleLayers}</p><p>${this._renderDiagnosticsRefineResults()}</p>`}_renderDiagnostics(){let{messages:e}=this,{diagnostics:t}=this.viewModel,i=t?.layerLimitExceeded;return i?.size?n`<calcite-notice class="diagnostics-notice" open kind=info scale=s><span slot=title>${e.maxRecordCountHeading}</span><div slot=message>${i.size<=oe?this._renderDiagnosticsList(i):this._renderDiagnosticsMultipleLayers()}</div></calcite-notice>`:null}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:i,messages:s,initialDisplayMode:a,featureMenuOpen:o,_featureFlowItemSelected:r,_collapseEnabled:l,_isCollapsed:d,featureNavigationTop:c,headingLevel:v}=this,{active:F,features:p,streamingFeatures:w}=e,q=i??s.selectFeature,y=h(s.backLabel??"",{title:this._selectedFeatureHeadingText});if(a==="feature"&&!o)return null;let G=!r;return n`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${$(b({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!F} .collapsed=${a==="list"&&d} .collapseDirection=${this.collapseDirection??(c?"down":"up")} .collapsible=${a==="list"&&l} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:y}} .description=${this.hideFeatureMenuHeading?void 0:h(s.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:q} .headingLevel=${v} .loading=${e.waitingForResult} .selected=${G} @calciteFlowItemBack=${K=>{K.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${a==="list"?this._renderHeaderActions():null}${w?n`<calcite-loader class="loader" inline .label=${s.loading??""} slot=header-actions-end></calcite-loader>`:null}${this._renderDiagnostics()}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" aria-hidden=true ${m(this._featureMenuIntersectionObserverCreated)}></div>${a==="feature"?n`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${y} title=${y??g}>${s.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{hideCloseButton:i,active:s,hideHeading:a,hideSelectFeature:o,messages:r}=this,l=r.returnToInitialFeature??"",d=r?.selectFeature,c="showAllEnabled"in e?e.showAllEnabled:!1,v=e.flowType==="feature"||e.flowType==="feature-association"||e.flowType==="feature-relationship"&&!c,F=e.flowType!=="feature"&&v&&"isFeatureFromTable"in e&&!e.isFeatureFromTable&&!o,p=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?n`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return n`<calcite-flow-item .closable=${!i} .closed=${!s} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${A(this._getDrillInFlowItemDescription(e)??"")} .heading=${a?void 0:A(e.heading??"")} .selected=${t} @calciteFlowItemBack=${w=>{w.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${a?null:n`<div slot=heading><div .innerHTML=${M.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${M.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${l??""} title=${l??""??g}></calcite-action>${F?n`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${d??""} title=${d??g}></calcite-action>`:null}${v&&this._renderActionBar(e)||""}<div class="container">${e}</div>${p}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,i=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,s=i&&e.length===0,a=e.length===0&&this._featureFlowItemSelected&&!i,o=e?.map((d,c)=>this._renderFlowItem(d,this._featureFlowItemSelected&&c===e.length-1)),r=this._renderBrowseAggregateContainer(!!s),l=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(a)]:[this._renderContentFeature(a),this._renderFeatureMenuContainer()];return n`<calcite-flow ${m(this._flowContainerNode)}>${l}${r}${o}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:i,messages:s}=this,{selectedFeature:a}=this.viewModel,o=this.viewModel.aggregatedFeaturesEnabled&&a?.isAggregate,r=h(s.backLabel??"",{title:this._selectedFeatureHeadingText});return o?n`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!i} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?h(s.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${s.aggregatedFeatures} @calciteFlowItemBack=${l=>{l.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:r}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${a??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${s} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${r} title=${r??g}>${s.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(e){let t=this.#e(e),i=!!t.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return n`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??g} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(t,e)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e,t){return e.map(i=>{let s=this._getActionTitle(i,t),a=this._getActionLabel(i,t);return n`<calcite-action .active=${i.type==="toggle"?i.value:!1} .disabled=${i.disabled} .icon=${i.icon??void 0} .loading=${i.active} scale=s .textEnabled=${!this._hideActionText} .text=${s??""} .label=${a??s} title=${a??s??g} .hidden=${!i.visible} @click=${()=>this._triggerAction(i,t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t,includeDefaultActions:i,actions:s}=this.viewModel;return t?n`<arcgis-feature-next .actions=${s} .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .includeDefaultActions=${i} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?k(e,n`<div .innerHTML=${M.sanitize(e)??""}></div>`):e??null}};N("arcgis-features-next",R);return R},"support/actions/ActionButton","core/Collection","popup/FeaturesModel","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils","graphic/getGraphicOriginTitle",a,c,d,e,h,i,j,l)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as m}from"./WJQUE4DR.js";import{a as b}from"./ZSPYPXBY.js";import{h as A}from"./IFR4IYSI.js";import"./7VDBR3SK.js";import"./FIZMK7GS.js";import{c as p}from"./ZKWI43WZ.js";import{P as y,U as d,X as v,a as g,b as r,x as h}from"./3UMLR76Y.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{watch:f}])=>{var w=g`:host{--arcgis-internal-exploratory-analysis-width: fit-content;display:flex;justify-content:flex-end;width:var(--arcgis-internal-exploratory-analysis-width)}:host(:is([data-content-open],[show-heading])){--arcgis-internal-exploratory-analysis-width: var(--arcgis-internal-panel-width, 300px);calcite-panel{min-width:var(--arcgis-internal-panel-width, 300px)}calcite-action-bar{width:100%}}calcite-panel{flex:none}calcite-action-bar{width:fit-content}.selection-notice-container{padding:var(--calcite-spacing-md)}.selection-notice-list{margin-block:0;padding-inline-start:var(--calcite-spacing-lg)}.measurement-content{--arcgis-internal-padding: var(--calcite-space-md) var(--calcite-space-none);margin-block-end:var(--calcite-space-none)}.measurement-content,slot::slotted(*){width:100%}.footer{display:grid;grid-template-columns:1fr 2fr;gap:var(--calcite-spacing-md);width:100%}`,_=["arcgis-area-measurement-2d","arcgis-area-measurement-3d","arcgis-direct-line-measurement-3d","arcgis-distance-measurement-2d","arcgis-elevation-profile","arcgis-volume-measurement"];function C(o){return o?.state==="measuring"||o?.state==="creating"||o?.state==="selecting"}var $=_.join(","),u=class extends y{constructor(){super(),this._messages=b({blocking:!0}),this.#s=!1,this.#t=new WeakMap,this._activeAnalysisHasInput=!1,this._measurements=[],this.autoDestroyDisabled=!1,this.autoStartDisabled=!1,this.closed=!1,this.icon="measure",this.preserveAnalysisOnChange=!1,this.requireActiveAnalysis=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showHeading=!1,this.arcgisClose=h(),this.arcgisPropertyChange=A()("activeAnalysis"),this.arcgisReady=h(),this.listen("arcgisPropertyChange",this.#r.bind(this)),this.listen("arcgisReady",this.#r.bind(this))}static{this.properties={_activeAnalysisHasInput:16,_activeAnalysisState:16,_measurements:16,activeAnalysis:1,autoDestroyDisabled:5,autoStartDisabled:5,closed:5,icon:1,messageOverrides:0,preserveAnalysisOnChange:5,requireActiveAnalysis:5,showCloseButton:5,showCollapseButton:5,showHeading:7}}static{this.styles=w}#a;#s;#t;#e;#n;#i;get activeAnalysis(){return this.#a}set activeAnalysis(e){this.#e=typeof e=="string"?e:void 0,this.#c(typeof e=="string"?this._measurements.find(i=>i.localName===e):e??void 0)}async destroy(){await this.manager.destroy()}load(){this.manager.onLifecycle(()=>(this.#o(),()=>{this.#i=m(this.#i),this.#n=void 0}))}async#l(){await this.activeAnalysis?.clear()}#m(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}async#u({target:e}){let i=Number(e.selectedActions.at(0)?.dataset.measurementIndex),s=this._measurements[i],a=this.activeAnalysis;if(s){if(s!==a&&(!this.preserveAnalysisOnChange||C(a))&&await this.#l(),this.#h(s),this.autoStartDisabled||s.interactionDisabled||this.preserveAnalysisOnChange&&s.analysis?.valid)return;await s.start()}else await this.#l(),this.#h(void 0)}#r(){this._activeAnalysisState=this.activeAnalysis?this.activeAnalysis.state??"disabled":void 0,this.#o(),this.#d(),this.requestUpdate()}#g({currentTarget:e}){let i=p(e,$),s=this._measurements.filter(t=>!i.includes(t));for(let t of s){let l=this.#t.get(t);t.hidden=l?.hidden??!1,t.hideStartButton=l?.hideStartButton??!1,"hideClearButton"in t&&(t.hideClearButton=l?.hideClearButton??!1),"hideHeader"in t&&(t.hideHeader=l?.hideHeader??!1),this.#t.delete(t)}for(let t of i)this.#t.has(t)||(this.#t.set(t,{hidden:t.hidden,hideClearButton:"hideClearButton"in t?t.hideClearButton:void 0,hideStartButton:t.hideStartButton,hideHeader:"hideHeader"in t?t.hideHeader:void 0}),t.componentOnReady().then(()=>{this.isConnected&&t.isConnected&&this._measurements.includes(t)&&this.requestUpdate()})),t.hideStartButton=!0,"hideClearButton"in t&&(t.hideClearButton=!0),"hideHeader"in t&&(t.hideHeader=!0);this._measurements=i;let a;this.#e&&(a=i.find(t=>t.localName===this.#e));let c;!this.#e&&i.length===1&&(c=i[0]);let n;this.#e?n=a:this.#s&&i.length>1?n=void 0:this.activeAnalysis&&i.includes(this.activeAnalysis)?n=this.activeAnalysis:n=c,this.#c(n),this.#s=!!c}#h(e){this.#e=void 0,this.#s=!1,this.#c(e)}#c(e){let i=this.#a;this.#a=e,this.el.toggleAttribute("data-content-open",!!e),this.requestUpdate("activeAnalysis",i),this.#y()}#y(){this._activeAnalysisState=this.activeAnalysis?this.activeAnalysis.state??"disabled":void 0,this.#o(),this.#d()}#d(){for(let e of this._measurements)e.hidden=e!==this.activeAnalysis||(this.#t.get(e)?.hidden??!1)||e===this.activeAnalysis&&this._activeAnalysisState==="ready"}async#v(){await this.activeAnalysis?.start()}#o(){let e=this.activeAnalysis?.analysis;if(!(e===this.#n&&(e==null||this.#i))){if(this.#i=m(this.#i),this.#n=e,!e){this._activeAnalysisHasInput=!1;return}this.#i=f(()=>e.valid,i=>this._activeAnalysisHasInput=i,{initial:!0,sync:!0})}}render(){let{showCloseButton:e,showCollapseButton:i,showHeading:s}=this,a=this._activeAnalysisState==="disabled",c=this._measurements.length>1,n=this.activeAnalysis?.label||this._messages.componentLabel;return r`<calcite-panel .closed=${this.closed} .heading=${s?this._messages.componentLabel:void 0} .collapsible=${i} .closable=${e} @calcitePanelClose=${this.#m}><div .hidden=${!c}><calcite-action-bar expand-toggle-disabled layout=horizontal .overflowMode=${!s&&!this.activeAnalysis?"none":"collapse"}><calcite-action-group .label=${this._messages.toolbarLabel} @calciteActionGroupChange=${this.#u} .selectionMode=${this.requireActiveAnalysis?"single-persist":"single"}>${this._measurements.map((t,l)=>r`<calcite-action .active=${t===this.activeAnalysis} data-measurement-index=${l??d} .icon=${t.icon} .label=${t.label} .text=${t.label??""} title=${t.label??d}></calcite-action>`)}</calcite-action-group></calcite-action-bar></div><div class="measurement-container" .hidden=${!this.activeAnalysis||a}><calcite-block class="measurement-content" .expanded=${this.isConnected&&!!this.activeAnalysis&&!a} .heading=${n}><slot @slotchange=${this.#g.bind(this)}></slot></calcite-block></div>${this.activeAnalysis?r`<div class="footer" slot=footer><calcite-button appearance=transparent .disabled=${!this._activeAnalysisHasInput} kind=danger @click=${this.#l} width=full>${this._messages.clear}</calcite-button><calcite-button .disabled=${this.activeAnalysis.interactionDisabled||this._activeAnalysisState!=="ready"&&!this._activeAnalysisHasInput} @click=${this.#v} width=full>${this.activeAnalysis?.matches("arcgis-elevation-profile")?this._messages.newProfile:this._messages.newMeasurement}</calcite-button></div>`:null}</calcite-panel>`}};v("arcgis-exploratory-analysis",u);return u},"core/reactiveUtils")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import j from"./FZAQZSRA.js";import i from"./ZHSESERJ.js";import"./PIDNZKSJ.js";import e from"./BQBWXR6P.js";import{a as $}from"./ZSPYPXBY.js";import d from"./ALVAGE57.js";import c from"./HPWF3IQV.js";import{f as A,h as P}from"./IFR4IYSI.js";import"./7VDBR3SK.js";import a from"./QPSAD5DG.js";import"./FIZMK7GS.js";import{e as k}from"./ZKWI43WZ.js";import{N as h,O as g,P as M,R as b,S as z,X as E,a as D,b as f,x as v}from"./3UMLR76Y.js";import"./TAVTDQ6S.js";export default $arcgis.t(([H,{stripHTML:R},{watch:p},B,,,,F,,L])=>{var V=D`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-spacing-lg) var(--calcite-spacing-lg) var(--calcite-spacing-xxxl) var(--calcite-spacing-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-spacing-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-spacing-xs));opacity:0}to{transform:translate(0);opacity:1}}`;function w(_){return _&&Number.parseInt(_.replaceAll(/[^-\d.]/gu,""),10)||0}var I=F(H),N={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},C=class extends M{constructor(){super(...arguments),this._direction=A(),this._headingText={html:"",text:""},this._featuresComponent=h(),this._dockAction=new B({id:"popup-dock-action"}),this._mainContainerNode=h(),this._pointerNode=h(),this.messages=$(),this.viewModel=I(this),this._containerNode=h(),this._popupResizeObserver=new ResizeObserver(()=>this._positionContainer()),this._positionContainer=()=>{this.positionStyle=this._calculatePositionStyle()},this.screenLocation=L(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.alignment="auto",this.autoCloseEnabled=!1,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.diagnostics=this.viewModel.diagnostics,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.dockEnabled=!1,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.features=this.viewModel.features,this.featureStream=this.viewModel.featureStream,this.focusTrapDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideCollapseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideEmptyRelationshipContent=!1,this.hideHeading=!1,this.hideSpinner=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.open=this.viewModel.open,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=P()("active","collapsed","currentAlignment","dockEnabled","effectiveHeading","featureCount","featureMenuOpen","features","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=v(),this.arcgisClose=v(),this.arcgisTriggerAction=v()}static{this.properties={screenLocation:16,positionStyle:16,_featureNavigationTop:16,_effectiveDockEnabled:16,actions:0,active:0,alignment:1,autoCloseEnabled:5,autoDestroyDisabled:5,collapsed:5,content:1,diagnostics:32,currentAlignment:32,currentDockPosition:32,defaultPopupTemplateEnabled:5,dockEnabled:5,dockOptions:0,effectiveHeading:32,featureCount:0,featureMenuOpen:5,featureMenuTitle:1,features:0,featureStream:0,focusTrapDisabled:5,goToOverride:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideCollapseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideEmptyRelationshipContent:5,hideHeading:5,hideSpinner:5,highlightDisabled:5,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,messageOverrides:0,open:5,referenceElement:1,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,state:32,topLayerDisabled:5,updateLocationEnabled:5,view:0}}static{this.styles=V}get trackLocation(){return this.active&&!this._effectiveDockEnabled}get _featureNavigationTop(){let{currentAlignment:e,currentDockPosition:t}=this;return e==="bottom-left"||e==="bottom-center"||e==="bottom-right"||e==="bottom-start"||e==="bottom-end"||t==="top-left"||t==="top-center"||t==="top-right"||t==="top-start"||t==="top-end"}get _effectiveDockEnabled(){return this.viewModel?.view?.focusRegionEnabled?!0:this.dockEnabled}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._dockOptions||N}set dockOptions(e){let t={...N},o=this.viewModel?.view?.breakpoints,i={};o&&(i.width=o.xsmall,i.height=o.xsmall);let a={...t,...e},n={...t.breakpoint,...i},{breakpoint:r}=a;typeof r=="object"?a.breakpoint={...n,...r}:r&&(a.breakpoint=n),this._dockOptions=a}get selectedDrillInFeature(){return this._featuresComponent.value?.selectedDrillInFeature??null}get selectedFeatureComponent(){return this._featuresComponent.value?.selectedFeatureComponent??null}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy(),this._dockAction.destroy(),this._popupResizeObserver.disconnect()}async openFeatureStream(e){this.viewModel.openFeatureStream(e)}async next(){this.viewModel.next()}async previous(){this.viewModel.previous()}async setFocus(){this._featuresComponent.value?.setFocus()}connectedCallback(){super.connectedCallback(),this._syncPopupResizeObserver()}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.viewModel?.view?.widthBreakpoint,this._effectiveDockEnabled,this._direction],()=>this._handleDockIcon(),{initial:!0}),p(()=>[this._effectiveDockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),{initial:!0}),p(()=>[this.dockOptions,this._featuresComponent.value,this.viewModel?.view?.focusRegionEnabled],()=>{let{_dockAction:e,dockOptions:t}=this,o=this._featuresComponent.value?.headerActions;o?.remove(e),t.buttonEnabled&&!this.viewModel?.view?.focusRegionEnabled&&o?.add(e)},{initial:!0}),p(()=>[this._pointerNode.value,this.alignment,this.currentAlignment,this._effectiveDockEnabled,this.dockOptions,this.screenLocation,this.viewModel?.active,this.viewModel?.location,this.viewModel?.view?.size],()=>this._positionContainer(),{initial:!0}),p(()=>this._mainContainerNode.value,e=>{this._syncPopupResizeObserver(e)},{initial:!0}),p(()=>this.viewModel?.view?.size,(e,t)=>this._updateDockEnabledForViewSize(e,t)),p(()=>this.viewModel?.view?.ready,()=>this._setDockEnabledForViewSize(this.dockOptions),{initial:!0}),p(()=>this.view?.map,e=>{this.viewModel.map=e},{initial:!0}),p(()=>this.screenLocation,(e,t)=>this._autoClose(e,t)),p(()=>[this.active,this._containerNode.value,this._effectiveDockEnabled,this.topLayerDisabled],()=>this._togglePopover(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._popupResizeObserver.disconnect()}_togglePopover(){this._containerNode.value?.togglePopover(this.active&&!this._effectiveDockEnabled&&!this.topLayerDisabled)}_syncPopupResizeObserver(e=this._mainContainerNode.value){this._popupResizeObserver.disconnect(),e&&this._popupResizeObserver.observe(e)}_handleClose(e){e.stopPropagation(),this.arcgisClose.emit()}_autoClose(e,t){this.autoCloseEnabled&&e!=null&&t!=null&&(this.open=!1)}_handleArcgisPropertyChange(e){e.detail.name==="collapsed"&&(this.collapsed=e.target.collapsed)}_handleArcgisTriggerAction(e){e.stopPropagation(),e.detail.action===this._dockAction&&(this.dockEnabled=!this.dockEnabled),this.arcgisTriggerAction.emit({action:e.detail.action})}_isOutsideView(e){let{popupHeight:t,popupWidth:o,screenLocation:i,side:a,view:n}=e;return Number.isNaN(o)||Number.isNaN(t)||!n||!i?!1:a==="right"&&i.x+o/2>n.width||a==="left"&&i.x-o/2<0||a==="top"&&i.y-t<0||a==="bottom"&&i.y+t>n.height}_getPointerSize(){let{_pointerNode:e}=this,t=e.value?window.getComputedStyle(e.value):null,o=w(t?.height),i=w(t?.width);return Math.hypot(o,i)}_getHeadingText(){let e=this.heading??"";return this._headingText.html!==e&&(this._headingText={html:e,text:R(e)}),this._headingText.text}_calculateAutoAlignment(e){if(e!=="auto")return e;let{_mainContainerNode:t,_popupRect:o,viewModel:i}=this,{view:a}=i,{screenLocation:n}=this;if(n==null||!a||!o||!t.value)return"top-center";let r=window.getComputedStyle(t.value),l=w(r.maxHeight),s=w(r.height),c=this._getPointerSize(),{height:d,width:y}=o,u=y+c,m=Math.max(d,l,s)+c,O=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"right",view:a}),T=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"left",view:a}),x=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"top",view:a}),S=this._isOutsideView({popupHeight:m,popupWidth:u,screenLocation:n,side:"bottom",view:a});return T?x?"bottom-right":"top-right":O?x?"bottom-left":"top-left":x?S?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return typeof e=="function"?e.call(this):e}_getCurrentAlignment(){return this._effectiveDockEnabled||!this.active||!this._mainContainerNode.value?null:this._calculateAutoAlignment(this._callCurrentAlignment(this.alignment))}_callDockPosition(e){return typeof e=="function"?e.call(this):e}_getDockPosition(){return this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))}_getCurrentDockPosition(){return this._effectiveDockEnabled&&this.active?this._getDockPosition():null}_calculateAutoDockPosition(e){if(e!=="auto")return e;let t=this.viewModel?.view,o="top-end";if(!t)return o;let{breakpoints:i}=t;return i?.xsmall&&t.width<=i.xsmall?"bottom-center":o}_getDockIcon(){let e=this._getDockPosition(),{_direction:t}=this;if(this._effectiveDockEnabled)return"minimize";switch(e){case"top-left":case"bottom-left":return"dock-left";case"top-center":return"maximize";case"bottom-center":return"dock-bottom";case"top-right":case"bottom-right":return"dock-right";case"top-start":case"bottom-start":return t==="rtl"?"dock-right":"dock-left";default:return t==="rtl"?"dock-left":"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this._effectiveDockEnabled?this.messages?.undock:this.messages?.dock}_calculateAlignmentPosition(e,t,o,i){if(e<0||t<0||!o||!i||e>o.width||t>o.height)return;let{topLayerDisabled:a}=this,n=a?e:e+o.x,r=a?t:t+o.y,{_direction:l,currentAlignment:s}=this,c=this._getPointerSize(),d=c/2;if(s==="top-left"||s==="top-start"&&l==="ltr"||s==="top-end"&&l==="rtl")return{top:r-(i.height+d),left:n-i.width-d};if(s==="top-center")return{top:r-(i.height+c),left:n-i.width/2};if(s==="top-right"||s==="top-end"&&l==="ltr"||s==="top-start"&&l==="rtl")return{top:r-(i.height+d),left:n+d};if(s==="bottom-left"||s==="bottom-start"&&l==="ltr"||s==="bottom-end"&&l==="rtl")return{top:r+d,left:n-i.width-d};if(s==="bottom-center")return{top:r+c,left:n-i.width/2};if(s==="bottom-right"||s==="bottom-end"&&l==="ltr"||s==="bottom-start"&&l==="rtl")return{top:r+d,left:n+d}}_getPositionStyleValue(e){return e!=null?`${e}px`:"auto"}_calculatePositionStyle(){if(this._effectiveDockEnabled)return;let{screenLocation:e}=this;if(e==null)return;let t=this.view?.container?.getBoundingClientRect(),o=this._mainContainerNode.value?.getBoundingClientRect();this._popupRect=o;let i=this._calculateAlignmentPosition(e.x,e.y,t,o);if(i)return`inset: ${this._getPositionStyleValue(i.top)} ${this._getPositionStyleValue(i.right)} ${this._getPositionStyleValue(i.bottom)} ${this._getPositionStyleValue(i.left)};`}_dockingThresholdCrossed(e,t,o){let[i,a]=e,[n,r]=t,{width:l=0,height:s=0}=o??{};return i<=l&&n>l||i>l&&n<=l||a<=s&&r>s||a>s&&r<=s}_updateDockEnabledForViewSize(e,t){if(!e||!t||!this.viewModel?.view?.ready)return;let{dockOptions:o}=this,i=o.breakpoint;typeof i=="object"&&this._dockingThresholdCrossed(e,t,i)&&this._setDockEnabledForViewSize(o)}_shouldDockAtCurrentViewSize(e){let t=e.breakpoint,o=this.viewModel?.view?.ui;if(!o)return!1;let{width:i,height:a}=o;if(Number.isNaN(i)||Number.isNaN(a)||typeof t!="object")return!1;let n=typeof t.width=="number"&&i<=(t.width??0),r=typeof t.height=="number"&&a<=(t.height??0);return n||r}_setDockEnabledForViewSize(e){this.viewModel?.view?.ready&&typeof e.breakpoint=="object"&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}render(){let{_direction:e,_effectiveDockEnabled:t,currentAlignment:o,currentDockPosition:i,positionStyle:a}=this,{active:n,view:r}=this.viewModel,l=n&&t,s=n&&!t,c=r?.widthBreakpoint,d=r?.heightBreakpoint,y={"aligned-top-center":o==="top-center","aligned-bottom-center":o==="bottom-center","aligned-top-left":o==="top-left"||o==="top-start"&&e==="ltr"||o==="top-end"&&e==="rtl","aligned-bottom-left":o==="bottom-left"||o==="bottom-start"&&e==="ltr"||o==="bottom-end"&&e==="rtl","aligned-top-right":o==="top-right"||o==="top-end"&&e==="ltr"||o==="top-start"&&e==="rtl","aligned-bottom-right":o==="bottom-right"||o==="bottom-end"&&e==="ltr"||o==="bottom-start"&&e==="rtl","is-docked":l,shadow:s,"is-rtl":this._direction==="rtl","is-docked-top-start":i==="top-start","is-docked-top-end":i==="top-end","is-docked-top-left":i==="top-left","is-docked-top-center":i==="top-center","is-docked-top-right":i==="top-right","is-docked-bottom-left":i==="bottom-left","is-docked-bottom-center":i==="bottom-center","is-docked-bottom-right":i==="bottom-right","is-docked-bottom-start":i==="bottom-start","is-docked-bottom-end":i==="bottom-end","is-xl-width-breakpoint":c==="xlarge","is-lg-width-breakpoint":c==="large","is-md-width-breakpoint":c==="medium","is-sm-width-breakpoint":c==="small","is-xs-width-breakpoint":c==="xsmall","is-xl-height-breakpoint":d==="xlarge","is-lg-height-breakpoint":d==="large","is-md-height-breakpoint":d==="medium","is-sm-height-breakpoint":d==="small","is-xs-height-breakpoint":d==="xsmall"};return f`<div style=${z(a)} class=${b(k("root",y,{hidden:!n||!a&&!t}))} .ariaHidden=${!n} .ariaLabel=${this._getHeadingText()} popover=manual ${g(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`}_renderPointer(){return!this._effectiveDockEnabled||!this.active?f`<div class="pointer" role=presentation><div class=${b(k("pointer-direction","shadow"))} ${g(this._pointerNode)}></div></div>`:null}_renderMainContainer(){let e={shadow:this._effectiveDockEnabled},t={...this.messageOverrides,collapse:this.messageOverrides?.collapse??this.messages.collapse,expand:this.messageOverrides?.expand??this.messages.expand};return f`<div class=${b(k("main-container",e))} ${g(this._mainContainerNode)}><arcgis-features-next .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .focusTrapEnabled=${!this.focusTrapDisabled} .headingLevel=${this.headingLevel} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .messageOverrides=${t} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${g(this._featuresComponent)}><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-features-next></div>`}};E("arcgis-popup",C);return C},"popup/FeaturesModel","applications/Components/stringUtils","core/reactiveUtils","support/actions/ActionButton",a,c,d,e,i,j)
|