@arcgis/core 4.25.0-next.20220818 → 4.25.0-next.20220821

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/analysis/LengthDimension.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0b1d39dc063c4c3385e2.js +1 -0
  4. package/assets/esri/core/workers/chunks/{59a04f1640cd2b710028.js → 0c625803648e554f1fcf.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{50985ec72b9e4557d371.js → 0f1fae79b5311d55c0da.js} +1 -1
  6. package/assets/esri/core/workers/chunks/1a360d839c4eb83aaa02.js +1 -0
  7. package/assets/esri/core/workers/chunks/3381b5454cd530cf940a.js +1 -0
  8. package/assets/esri/core/workers/chunks/3900c702242358c5d00e.js +1 -0
  9. package/assets/esri/core/workers/chunks/43f84cb852c9ab5e742f.js +1 -0
  10. package/assets/esri/core/workers/chunks/4637bfd3deff50b03f2e.js +1 -0
  11. package/assets/esri/core/workers/chunks/4d5bdf18feeb9c8cb6ff.js +1 -0
  12. package/assets/esri/core/workers/chunks/5c2574365af4a484cd4b.js +1 -0
  13. package/assets/esri/core/workers/chunks/70179a003b5e52a99e10.js +1 -0
  14. package/assets/esri/core/workers/chunks/77a38124ef155a1b0f3e.js +1 -0
  15. package/assets/esri/core/workers/chunks/{ab0ce16ced3532f0e429.js → 81418b47acb4ef68daf7.js} +1 -1
  16. package/assets/esri/core/workers/chunks/88b5ce63c4706d0954dc.js +1 -0
  17. package/assets/esri/core/workers/chunks/{064a4baa576964efa238.js → 9809878b87595ac77dc4.js} +1 -1
  18. package/assets/esri/core/workers/chunks/9dbe94a70624a5592690.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d013daa46de022f0db4d.js → a0750175b499a89fd07d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/be4a8a4b2804188817b3.js +1 -0
  21. package/assets/esri/core/workers/chunks/da13db62d54cbca350c3.js +1 -0
  22. package/assets/esri/core/workers/chunks/e472e4f4a2f046846258.js +1 -0
  23. package/assets/esri/core/workers/chunks/f351cccf879ba295acbc.js +1 -0
  24. package/chunks/boundedPlane.js +1 -1
  25. package/chunks/pe.js +1 -1
  26. package/core/Identifiable.js +1 -1
  27. package/geometry/Circle.js +1 -1
  28. package/geometry/Extent.js +1 -1
  29. package/geometry/Mesh.js +1 -1
  30. package/geometry/Multipoint.js +1 -1
  31. package/geometry/Point.js +1 -1
  32. package/geometry/geometryEngine.js +1 -1
  33. package/geometry/geometryEngineAsync.js +1 -1
  34. package/geometry/projection.js +1 -1
  35. package/geometry/support/aaBoundingBox.js +1 -1
  36. package/geometry/support/boundsUtils.js +1 -1
  37. package/geometry/support/centroid.js +1 -1
  38. package/geometry/support/cut.js +1 -1
  39. package/geometry/support/extentUtils.js +1 -1
  40. package/geometry/support/geodesicUtils.js +1 -1
  41. package/geometry/support/heightModelInfoUtils.js +1 -1
  42. package/geometry/support/meshUtils/primitives.js +1 -1
  43. package/geometry/support/quantizationUtils.js +1 -1
  44. package/interfaces.d.ts +60 -84
  45. package/layers/DimensionLayer.js +1 -1
  46. package/layers/support/ExportImageServiceParameters.js +1 -1
  47. package/layers/support/imageryRendererUtils.js +1 -1
  48. package/package.json +1 -1
  49. package/renderers/support/rasterRendererHelper.js +1 -1
  50. package/support/revision.js +1 -1
  51. package/symbols/cim/CIMResourceManager.js +1 -1
  52. package/symbols/cim/cimAnalyzer.js +1 -1
  53. package/symbols/cim/quantizeTime.js +5 -0
  54. package/views/2d/engine/webgl/TextureManager.js +1 -1
  55. package/views/2d/engine/webgl/animatedFormats/AnimatableTextureResource.js +5 -0
  56. package/views/2d/engine/webgl/animatedFormats/apng.js +1 -1
  57. package/views/2d/engine/webgl/animatedFormats/gif.js +1 -1
  58. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  59. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  60. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  61. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  62. package/views/3d/analysis/Dimensioning/lengthDimensionUtils.js +1 -1
  63. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  64. package/views/3d/analysis/support/measurementUtils.js +1 -1
  65. package/views/3d/terrain/PlanarPatch.js +1 -1
  66. package/views/3d/terrain/SphericalPatch.js +1 -1
  67. package/views/3d/terrain/TerrainSurface.js +1 -1
  68. package/views/3d/terrain/Tile.js +1 -1
  69. package/views/3d/terrain/interfaces.js +1 -1
  70. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  71. package/widgets/Bookmarks.js +1 -1
  72. package/widgets/Search/SearchViewModel.js +1 -1
  73. package/assets/esri/core/workers/chunks/229bfbf3faa789f40b7e.js +0 -1
  74. package/assets/esri/core/workers/chunks/2e715520e5badbe570ac.js +0 -1
  75. package/assets/esri/core/workers/chunks/40098b3be512ad8461f8.js +0 -1
  76. package/assets/esri/core/workers/chunks/420ae87ba8dc74fd05f5.js +0 -1
  77. package/assets/esri/core/workers/chunks/46c836fc575251f1ff34.js +0 -1
  78. package/assets/esri/core/workers/chunks/481532ce4871b0d94587.js +0 -1
  79. package/assets/esri/core/workers/chunks/5fa78a6745ef14c7c4d1.js +0 -1
  80. package/assets/esri/core/workers/chunks/606f45a93c707054c521.js +0 -1
  81. package/assets/esri/core/workers/chunks/78e59b29e59b10f64aa9.js +0 -1
  82. package/assets/esri/core/workers/chunks/7be7c53727cb1bc73a64.js +0 -1
  83. package/assets/esri/core/workers/chunks/8d3fba983c360e1fdabf.js +0 -1
  84. package/assets/esri/core/workers/chunks/a69d194526bdc489b30b.js +0 -1
  85. package/assets/esri/core/workers/chunks/b59855826d235cba0889.js +0 -1
  86. package/assets/esri/core/workers/chunks/bff5812e3797c8e42ac0.js +0 -1
  87. package/assets/esri/core/workers/chunks/d6e177749bde46ab57fc.js +0 -1
  88. package/assets/esri/core/workers/chunks/d9c8a8bed6b34ed57faf.js +0 -1
  89. package/views/2d/engine/webgl/animatedFormats/BaseAnimatableTextureResource.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import{eventKey as e}from"../core/events.js";import o from"../core/Handles.js";import{isSome as i,isNone as s}from"../core/maybe.js";import{watch as r,initial as a,on as n}from"../core/reactiveUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as l}from"../core/accessorSupport/decorators/cast.js";import{subclass as k}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as m,convertDateFormatToIntlOptions as u}from"../intl/date.js";import{SlideThumbnail as h}from"../webdoc/support/SlideThumbnail.js";import c from"./Widget.js";import b from"./Bookmarks/BookmarksUserState.js";import _ from"./Bookmarks/BookmarksViewModel.js";import p from"./FeatureTable/Grid/support/ButtonMenu.js";import g from"./FeatureTable/Grid/support/ButtonMenuItem.js";import{Heading as B}from"./support/Heading.js";import{isActivationKey as v}from"./support/widgetUtils.js";import{messageBundle as f}from"./support/decorators/messageBundle.js";import{vmEvent as I}from"./support/decorators/vmEvent.js";import{tsx as E}from"./support/jsxFactory.js";import y from"sortablejs";function w(t,e,o){t.splice(o,0,t.splice(e,1)[0])}const S="bookmarks",x="data-bookmark-uid",A={base:"esri-bookmarks esri-widget--panel",loaderContainer:"esri-bookmarks__loader-container",loader:"esri-bookmarks__loader",fadeIn:"esri-bookmarks--fade-in",bookmarkList:"esri-bookmarks__list",bookmarkListSortable:"esri-bookmarks__list--sortable",bookmark:"esri-bookmarks__bookmark",bookmarkButton:"esri-bookmarks__bookmark-button",bookmarkImageContainer:"esri-bookmarks__bookmark-image-container",bookmarkEditButtonContainer:"esri-bookmarks__bookmark-edit-button-container",bookmarkEditButton:"esri-bookmarks__bookmark-edit-button",bookmarkDragHandle:"esri-bookmarks_bookmark-drag-handle",bookmarkDragHandleIcon:"esri-bookmarks_bookmark-drag-handle-icon",bookmarkIcon:"esri-bookmarks__bookmark-icon",bookmarkImage:"esri-bookmarks__image",bookmarkLabel:"esri-bookmarks__bookmark-label",bookmarkName:"esri-bookmarks__bookmark-name",bookmarkTimeExtent:"esri-bookmarks__bookmark-time-extent",bookmarkActive:"esri-bookmarks__bookmark--active",noBookmarksContainer:"esri-widget__content--empty",noBookmarksHeader:"esri-bookmarks__no-bookmarks-heading",noBookmarksIcon:"esri-widget__no-bookmark-icon",noBookmarksDescription:"esri-bookmarks__no-bookmarks-description",addingBookmark:"esri-bookmarks__adding-bookmark",addBookmark:"esri-bookmarks__add-bookmark",addBookmarkButton:"esri-bookmarks__add-bookmark-button",addBookmarkIcon:"esri-bookmarks__add-bookmark-icon",authoringCard:"esri-bookmarks__authoring-card",authoringContainer:"esri-bookmarks__authoring-container",authoringForm:"esri-bookmarks__authoring-form",authoringLabel:"esri-bookmarks__authoring-label",authoringActions:"esri-bookmarks__authoring-actions",authoringInputInvalid:"esri-bookmarks__authoring-input--invalid",authoringDeleteButton:"esri-bookmarks__authoring-delete-button",authoringCancelButton:"esri-bookmarks__authoring-cancel-button",timeExtentContainer:"esri-bookmarks__time-extent-container",timeExtent:"esri-bookmarks__time-extent",timeExtentGroup:"esri-bookmarks__time-extent-group",timeExtentDate:"esri-bookmarks__time-extent-date",timeExtentTime:"esri-bookmarks__time-extent-time",esriWidget:"esri-widget",esriWidgetDisabled:"esri-widget--disabled",esriButton:"esri-button",esriButtonTertiary:"esri-button--tertiary",esriInput:"esri-input",iconHandle:"esri-icon-handle-vertical",iconPlus:"esri-icon-plus",iconEdit:"esri-icon-edit",iconHandleHorizontal:"esri-icon-handle-horizontal",iconRefresh:"esri-icon-refresh",iconLink:"esri-icon-link",iconRemove:"esri-icon-erase",widgetIcon:"esri-icon-bookmark",header:"esri-widget__heading",loading:"esri-icon-loading-indicator",rotating:"esri-rotating"},T={addBookmark:!0,thumbnail:!0,time:!0},C=/^https:\/\/.*/i,U="esri.widgets.Bookmarks";let M=class extends c{constructor(t,e){super(t,e),this._handles=new o,this._addInputNode=null,this._editInputNode=null,this._urlEditInputNode=null,this._addBookmarkButtonNode=null,this._focusAddBookmarkButton=!1,this._focusEditInputBox=!1,this._focusAddInputBox=!1,this._focusUrlEditInputBox=!1,this._sortable=null,this._sortableNode=null,this._focusSortUid=null,this._selectedSortUid=null,this._sortableSavedItems=null,this._editIncludeTimeExtent=null,this._userState=null,this.disabled=!1,this.editingEnabled=!1,this.headingLevel=2,this.iconClass=A.widgetIcon,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new _,this.visibleElements={...T}}initialize(){this.addHandles([r((()=>this.viewModel?.bookmarks),(()=>this._bookmarksInitialized()),a),r((()=>this.editingEnabled),(()=>this._toggleSorting()),a)])}destroy(){this._destroySortable(),this._handles.destroy(),this._handles=null,this._editMenu.destroy()}loadDependencies(){return Promise.all([import("@esri/calcite-components/dist/components/calcite-label.js"),import("@esri/calcite-components/dist/components/calcite-switch.js")])}get _editMenuItems(){const{messages:t,_userState:e}=this,o=e?.editedBookmark?.thumbnail?.url;return[new g({label:t?.menu.refreshThumbnail,iconClass:A.iconRefresh,clickFunction:()=>this._refreshThumbnail()}),new g({label:C.test(o)?t?.menu.editImageUrl:t?.menu.useImageUrl,iconClass:A.iconLink,clickFunction:()=>this._startUseImageUrl()}),o?new g({label:t?.menu.removeThumbnail,iconClass:A.iconRemove,clickFunction:()=>this._removeThumbnail()}):null].filter(Boolean)}get _editMenu(){const{_editMenuItems:t,messages:e,disabled:o}=this,i=this._get("_editMenu");i&&i.destroy();const s=new p({disabled:o,iconClass:A.iconHandleHorizontal,label:e?.menu.label});return s.items=t,s}get defaultCreateOptions(){return this.viewModel.defaultCreateOptions}set defaultCreateOptions(t){this.viewModel.defaultCreateOptions=t}get defaultEditOptions(){return this.viewModel.defaultEditOptions}set defaultEditOptions(t){this.viewModel.defaultEditOptions=t}get bookmarks(){return this.viewModel.bookmarks}set bookmarks(t){this.viewModel.bookmarks=t}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(t){this.viewModel.goToOverride=t}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}castVisibleElements(t){return{...T,...t}}endAddBookmark(){this._userState=null}goTo(t){return this.viewModel.goTo(t)}render(){const{state:t}=this.viewModel,e="loading"===t?this.renderLoading():this.renderBookmarks();return E("div",{class:this.classes(A.base,A.esriWidget,{[A.esriWidgetDisabled]:this.disabled})},e)}startAddBookmark(){this._userState=new b({state:"add"}),this._focusAddInputBox=!0,this.scheduleRender()}renderLoading(){return E("div",{class:A.loaderContainer,key:"loader",tabIndex:this.disabled?-1:null},E("div",{class:A.loader}))}renderNoBookmarksContainer(){const{messages:t,disabled:e}=this;return E("div",{class:A.noBookmarksContainer,key:"no-bookmarks",tabIndex:e?-1:null},E("span",{"aria-hidden":"true",class:this.classes(A.noBookmarksIcon,A.widgetIcon)}),E(B,{level:this.headingLevel,class:this.classes(A.header,A.noBookmarksHeader)},t?.noBookmarksHeading),E("p",{class:A.noBookmarksDescription},t?.noBookmarksDescription))}renderAddBookmarkLoading(){return E("div",{key:"adding-bookmark",class:A.addingBookmark},E("span",{"aria-hidden":"true",class:this.classes(A.loading,A.rotating)}),this.messages?.addingBookmark)}renderBookmarkItems(t){if(!t)return null;const{_userState:e,editingEnabled:o}=this;return t.map((t=>o&&t&&e&&("edit"===e.state||"edit-thumbnail"===e.state)&&e.bookmark===t?"edit-thumbnail"===e.state?this.renderEditingBookmarkUrl(e.editedBookmark):this.renderEditingBookmark(e.editedBookmark):this.renderBookmark(t))).toArray()}renderBookmarksContainer(t){const{_userState:e,editingEnabled:o,disabled:i}=this,s="add"===e?.state,r=o&&!s?this.renderAddBookmarkButton():null,a=o?s&&e.loading?this.renderAddBookmarkLoading():"add"===e?.state?this.renderAddingBookmark():null:null;return[E("ul",{key:"bookmark-list","aria-label":this.messages?.widgetLabel,class:this.classes(A.bookmarkList,{[A.bookmarkListSortable]:this.editingEnabled}),afterCreate:this._sortNodeCreated,afterRemoved:this._destroySortable,"data-node-ref":"_sortableNode",bind:this,tabIndex:i?-1:null},this.renderBookmarkItems(t)),r,a]}renderAddBookmarkButton(){return this.visibleElements.addBookmark?E("div",{key:"add-bookmark-item",class:A.addBookmark},E("button",{class:this.classes(A.esriButton,A.esriButtonTertiary,A.addBookmarkButton),disabled:this.disabled,onclick:this.startAddBookmark,afterCreate:this._storeAddBookmarkButton,afterUpdate:this._storeAddBookmarkButton,"data-node-ref":"_addBookmarkButtonNode",bind:this,type:"button"},E("span",{"aria-hidden":"true",class:this.classes(A.addBookmarkIcon,A.iconPlus)}),this.messages?.addBookmark)):null}renderBookmarks(){const{bookmarks:t}=this.viewModel,e=t&&t.filter(Boolean),o=e&&e.length,i=o||this.editingEnabled?this.renderBookmarksContainer(e):null;return[o?null:this.renderNoBookmarksContainer(),i]}renderEditContainer(t){const{messagesCommon:e,disabled:o}=this;return E("div",{class:A.bookmarkEditButtonContainer,key:"edit-container"},E("button",{disabled:o,title:e?.edit,"aria-label":e?.edit,"data-bookmark":t,onclick:this._showEditBookmarkForm,bind:this,class:A.bookmarkEditButton,type:"button"},E("span",{"aria-hidden":"true",class:A.iconEdit})))}renderDragHandle(t){const{messagesCommon:e,disabled:o}=this,i={[x]:t.uid};return E("div",{role:"button",tabIndex:o?-1:0,key:"drag-handle",bind:this,class:A.bookmarkDragHandle,onkeydown:this._dragHandleKeydown,afterCreate:this._focusDragHandle,afterUpdate:this._focusDragHandle,onblur:this._dragHandleBlur,"aria-pressed":this._selectedSortUid===t.uid?"true":"false","aria-label":e?.dragHandleLabel,title:e?.dragHandleTitle,...i},E("span",{"aria-hidden":"true",class:this.classes(A.bookmarkDragHandleIcon,A.iconHandle)}))}renderBookmarkImageIcon(){return E("span",{"aria-hidden":"true",class:this.classes(A.bookmarkIcon,A.widgetIcon)})}renderBookmarkImage(t){const{visibleElements:e}=this,{thumbnail:o}=t,i=o&&o.url||"";return e.thumbnail&&i?E("img",{src:i,alt:"",class:A.bookmarkImage}):null}renderBookmarkTimeSwitch(t){const{messages:e,disabled:o}=this,{timeExtent:i}=t,{view:s}=this.viewModel;return s.timeExtent||i?E("calcite-label",{layout:"inline-space-between","disable-spacing":"true"},e.includeTimeExtent,E("calcite-switch",{scale:"s",disabled:o,checked:!!i,onCalciteSwitchChange:t=>this._editIncludeTimeExtent=!!t.detail.switched})):null}renderBookmarkTimeExtent(t){const{visibleElements:e}=this,{timeExtent:o}=t;return o?E("span",{class:A.timeExtent},[i(o.start)&&E("span",{key:"start-date-group",class:A.timeExtentGroup},E("span",{key:"start-date",class:A.timeExtentDate},this._formatDate(o.start)),e.time&&E("span",{key:"start-time",class:A.timeExtentTime},this._formatTime(o.start))),i(o.end)&&(s(o.start)||o.start.getTime()!==o.end.getTime())&&E("span",{key:"end-date-group",class:A.timeExtentGroup},E("span",{key:"end-date",class:A.timeExtentDate},this._formatDate(o.end)),e.time&&E("span",{key:"end-time",class:A.timeExtentTime},this._formatTime(o.end)))]):null}renderBookmarkButton(t){const{messagesCommon:e,disabled:o}=this,{name:i,timeExtent:s}=t,{abilities:r}=this.viewModel,a=i||e?.untitled,n=E("div",{class:A.bookmarkImageContainer},this.renderBookmarkImage(t)||this.renderBookmarkImageIcon()),d=r.time&&s?E("span",{key:"time-extent",class:A.bookmarkTimeExtent},this.renderBookmarkTimeExtent(t)):null;return E("button",{disabled:o,key:"bookmark-button",class:A.bookmarkButton,bind:this,"data-bookmark":t,onclick:this._goToBookmark,type:"button"},n,E("div",{class:A.bookmarkLabel},E("span",{key:"bookmark-title",class:A.bookmarkName},a),d))}renderBookmark(t){const{activeBookmark:e}=this.viewModel,o={[A.bookmarkActive]:e===t},i=this.editingEnabled?this.renderEditContainer(t):null,s={[x]:t.uid},r=this.editingEnabled?this.renderDragHandle(t):null;return E("li",{key:t,class:this.classes(A.bookmark,o),...s},r,this.renderBookmarkButton(t),i)}renderEditingBookmarkName(t){const{messages:e,_userState:o,disabled:i}=this,s="name-required"===o.validationState;return E("label",{class:A.authoringLabel},e?.title,s?E("strong",null,e?.invalidTitle):null,E("input",{required:!0,disabled:i,bind:this,class:this.classes(A.esriInput,s?A.authoringInputInvalid:null),type:"text",value:t.name,afterCreate:this._storeEditInput,afterUpdate:this._focusEditInput,"data-bookmark":t,"data-node-ref":"_editInputNode",placeholder:e?.titlePlaceholder}))}renderEditingBookmarkUrlActions(){const{messagesCommon:t,disabled:e}=this;return E("div",{class:A.authoringActions},E("input",{type:"button",disabled:e,value:t?.back,class:this.classes(A.esriButton,A.esriButtonTertiary),onclick:this._closeUrlEditBookmarkForm,bind:this}),E("input",{class:A.esriButton,disabled:e,type:"submit",value:t?.add}))}renderEditingBookmarkActions(){const{messagesCommon:t,disabled:e}=this,{bookmark:o}=this._userState;return E("div",{class:A.authoringActions},E("input",{type:"button",disabled:e,value:t?.delete,class:this.classes(A.esriButton,A.esriButtonTertiary,A.authoringDeleteButton),"data-bookmark":o,onclick:this._deleteBookmark,bind:this}),E("input",{disabled:e,type:"button",value:t?.cancel,class:this.classes(A.esriButton,A.esriButtonTertiary),onclick:this._closeEditBookmarkForm,bind:this}),E("input",{class:A.esriButton,disabled:e,type:"submit",value:t?.save}))}renderEditingBookmarkUrlInput(t){const{messages:e,_userState:o,disabled:i}=this,s=t.thumbnail?.url,r=C.test(s)?s:null,a="absolute-url-required"===o.validationState;return E("label",{class:A.authoringLabel},a?E("strong",null,e?.invalidImageUrl):null,E("input",{required:!0,disabled:i,bind:this,class:this.classes(A.esriInput,a?A.authoringInputInvalid:null),type:"text",value:r,afterCreate:this._storeUrlEditInput,afterUpdate:this._focusUrlEditInput,"data-bookmark":t,"data-node-ref":"_urlEditInputNode",title:e?.imageUrlTooltip,placeholder:e&&`https://<${e.imageUrlPlaceholder}>`}))}renderEditingBookmarkUrl(t){const e={[x]:t.uid};return E("li",{key:"edit-bookmark-url-form",class:A.authoringCard,...e},E("form",{class:A.authoringForm,disabled:this.disabled,onsubmit:this._editBookmarkUrlSubmit,bind:this},this.renderEditingBookmarkUrlInput(t),this.renderEditingBookmarkUrlActions()))}renderEditingBookmark(t){const e={[x]:t.uid},{abilities:o}=this.viewModel,i=o.time?E("div",{key:"edit-bookmark-time-container",class:A.timeExtentContainer},this.renderBookmarkTimeSwitch(t),this._editIncludeTimeExtent&&this.renderBookmarkTimeExtent(t)):null;return E("li",{key:"edit-bookmark-form",class:A.authoringCard,...e},E("form",{class:A.authoringForm,disabled:this.disabled,onsubmit:this._editBookmarkSubmit,bind:this},E("div",{class:A.authoringContainer},E("div",{class:A.bookmarkImageContainer},this.renderBookmarkImage(t),this._editMenu.render()),this.renderEditingBookmarkName(t)),i,this.renderEditingBookmarkActions()))}renderAddingBookmarkName(){const{_userState:t,messages:e,disabled:o}=this,i="name-required"===t.validationState;return E("label",{class:A.authoringLabel},e?.title,i?E("strong",null,e?.invalidTitle):null,E("input",{required:!0,disabled:o,bind:this,class:this.classes(A.esriInput,i?A.authoringInputInvalid:null),type:"text",afterCreate:this._storeAddInput,afterUpdate:this._focusAddInput,"data-node-ref":"_addInputNode",value:"",placeholder:e?.titlePlaceholder}))}renderAddingBookmarkActions(){const{messagesCommon:t,disabled:e}=this;return E("div",{class:this.classes(A.authoringActions)},E("input",{type:"button",disabled:e,value:t?.cancel,class:this.classes(A.esriButton,A.esriButtonTertiary,A.authoringCancelButton),onclick:this._endAddBookmark.bind(this),bind:this}),E("input",{class:A.esriButton,disabled:e,type:"submit",value:t?.add}))}renderAddingBookmark(){return E("div",{key:"add-bookmark-form",class:A.authoringCard},E("form",{class:A.authoringForm,onsubmit:this._addBookmarkSubmit,bind:this},this.renderAddingBookmarkName(),this.renderAddingBookmarkActions()))}_formatDate(t){return t?m(t,u("short-date")):null}_formatTime(t){return t?m(t,u("long-time")):null}_dragHandleBlur(){this._selectedSortUid=null,this.scheduleRender()}_dragHandleKeydown(t){const{_sortableSavedItems:o}=this,i=["ArrowDown","ArrowUp","Escape","Tab"," ","Enter"],s=e(t);if(!i.includes(s))return;const{_sortable:r,_selectedSortUid:a}=this,n=r.toArray(),d=t.target.getAttribute(x),l=n.indexOf(d);if(v(s)){const t=a&&a===d;return this._selectedSortUid=t?null:d,this._sortableSavedItems=t?null:this._sortable.toArray(),void this.scheduleRender()}if("Tab"===s)return this._selectedSortUid=null,void this.scheduleRender();if("Escape"===s&&o)return t.stopPropagation(),this._selectedSortUid=null,this._updateSortItems(o,r,d),void this.scheduleRender();if(-1===l||!a)return;const k="ArrowUp"===s?l-1:l+1;k>=n.length||k<=-1||(w(n,l,k),this._updateSortItems(n,r,d))}_updateSortItems(t,e,o){e.sort(t),this._sortBookmarks(e),this._focusSortUid=o,this._selectedSortUid=o}_focusDragHandle(t){const{_focusSortUid:e}=this;if(!t||!e)return;t.getAttribute(x)===e&&(t.focus(),this._focusSortUid=null)}_toggleSorting(){const{_sortable:t,_sortableNode:e,editingEnabled:o,disabled:i}=this;if(e)if(t)t.option("disabled",i||!o);else{const t=y.create(e,{dataIdAttr:x,handle:`.${A.bookmarkDragHandle}`,group:S,disabled:i||!o,onSort:()=>this._sortBookmarks(t)});this._sortable=t}}_sortNodeCreated(t){this._sortableNode=t,this._toggleSorting()}_sortBookmarks(t){const{bookmarks:e}=this.viewModel;if(!e)return;const o=t.toArray();e.sort(((t,e)=>{const i=o.indexOf(t.uid),s=o.indexOf(e.uid);return i>s?1:i<s?-1:0}))}_destroySortable(){const{_sortable:t}=this;t&&t.destroy(),this._sortable=null}_endAddBookmark(){this._focusAddBookmarkButton=!0,this.endAddBookmark()}_bookmarksInitialized(){const t="bookmarks-init",{_handles:e}=this;e.remove(t),e.add(n((()=>this.viewModel?.bookmarks),"change",(()=>this._bookmarksChanged())),t)}_bookmarksChanged(){const t="bookmarks-change",{bookmarks:e}=this.viewModel,{_handles:o}=this;o.remove(t);const i=e.map((t=>r((()=>[t?.name,t?.thumbnail?.url]),(()=>this.scheduleRender()))));o.add(i,t),this.scheduleRender()}_showEditBookmarkForm(t){const e=t.currentTarget["data-bookmark"];this._editIncludeTimeExtent=!!e.timeExtent,this._focusEditInputBox=!0,this._userState=new b({bookmark:e,state:"edit"}),this.viewModel.goTo(e),this.scheduleRender()}_closeUrlEditBookmarkForm(){this._focusEditInputBox=!0,this._userState.state="edit"}_closeEditBookmarkForm(){this._userState=null}_addBookmarkSubmit(t){t.preventDefault();const{_addInputNode:e,_userState:o}=this,i=e&&e.value.trim();i?(o.loading=!0,this.viewModel.createBookmark().then((t=>{t.name=i,this.viewModel.bookmarks.add(t),this._endAddBookmark()}))):o.validationState="name-required"}async _editBookmarkAndClose(t,e){const{viewModel:o}=this;await o.editBookmark(t,{...o.defaultEditOptions,...e}),this._closeEditBookmarkForm()}_editBookmarkSubmit(t){t.preventDefault();const{_editInputNode:e,_userState:o,_editIncludeTimeExtent:i}=this,s=e&&e.value.trim();s?(o.bookmark.name=s,o.bookmark.thumbnail=o.editedBookmark.thumbnail,i||(o.bookmark.timeExtent=null),this._editBookmarkAndClose(o.bookmark,{takeScreenshot:!1,captureTimeExtent:i})):o.validationState="name-required"}_storeAddBookmarkButton(t){this._addBookmarkButtonNode=t,this._focusAddBookmark()}_storeEditInput(t){this._editInputNode=t,this._focusEditInput()}_storeAddInput(t){this._addInputNode=t,this._focusAddInput()}_storeUrlEditInput(t){this._urlEditInputNode=t,this._focusUrlEditInput()}_focusUrlEditInput(){this._urlEditInputNode&&this._focusUrlEditInputBox&&(this._focusUrlEditInputBox=!1,this._urlEditInputNode.focus())}_focusAddInput(){this._addInputNode&&this._focusAddInputBox&&(this._focusAddInputBox=!1,this._addInputNode.focus())}_focusAddBookmark(){this._addBookmarkButtonNode&&this._focusAddBookmarkButton&&(this._focusAddBookmarkButton=!1,this._addBookmarkButtonNode.focus())}_focusEditInput(){this._editInputNode&&this._focusEditInputBox&&(this._focusEditInputBox=!1,this._editInputNode.focus())}_deleteBookmark(t){const e=t.currentTarget["data-bookmark"];this.viewModel.bookmarks.remove(e)}_goToBookmark(t){const e=t.currentTarget["data-bookmark"];this.endAddBookmark(),this._closeEditBookmarkForm(),this.viewModel.goTo(e)}async _refreshThumbnail(){const{_userState:t,_editMenu:e,viewModel:o}=this;t.validationState=void 0,await o.editBookmark(this._userState.editedBookmark,{takeScreenshot:!0,captureViewpoint:!1,captureRotation:!1,captureScale:!1,captureTimeExtent:!1}),e.open=!1,this._focusEditInputBox=!0,this.scheduleRender()}_removeThumbnail(){const{_userState:t,_editMenu:e}=this;t.editedBookmark.thumbnail=null,t.validationState=void 0,e.open=!1,this._focusEditInputBox=!0,this.scheduleRender()}_startUseImageUrl(){this._userState.state="edit-thumbnail",this._editMenu.open=!1,this._focusUrlEditInputBox=!0,this.scheduleRender()}_editBookmarkUrlSubmit(t){t.preventDefault();const{_urlEditInputNode:e,_userState:o}=this,i=e.value;C.test(i)?(i&&(o.editedBookmark.thumbnail=new h({url:i})),this._closeUrlEditBookmarkForm()):o.validationState="absolute-url-required"}};t([d()],M.prototype,"_editIncludeTimeExtent",void 0),t([d({type:b})],M.prototype,"_userState",void 0),t([d({readOnly:!0})],M.prototype,"_editMenuItems",null),t([d({readOnly:!0})],M.prototype,"_editMenu",null),t([d()],M.prototype,"defaultCreateOptions",null),t([d()],M.prototype,"defaultEditOptions",null),t([d()],M.prototype,"bookmarks",null),t([d()],M.prototype,"disabled",void 0),t([d()],M.prototype,"editingEnabled",void 0),t([d()],M.prototype,"headingLevel",void 0),t([d()],M.prototype,"goToOverride",null),t([d()],M.prototype,"iconClass",void 0),t([d()],M.prototype,"label",null),t([d(),f("esri/widgets/Bookmarks/t9n/Bookmarks")],M.prototype,"messages",void 0),t([d(),f("esri/t9n/common")],M.prototype,"messagesCommon",void 0),t([d(),f("esri/core/t9n/Units")],M.prototype,"messagesUnits",void 0),t([d()],M.prototype,"uiStrings",void 0),t([d()],M.prototype,"view",null),t([d({type:_}),I(["select-bookmark","bookmark-edit","bookmark-select"])],M.prototype,"viewModel",void 0),t([d()],M.prototype,"visibleElements",void 0),t([l("visibleElements")],M.prototype,"castVisibleElements",null),t([d()],M.prototype,"endAddBookmark",null),t([d()],M.prototype,"startAddBookmark",null),M=t([k(U)],M);const N=M;export{N as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import{eventKey as e}from"../core/events.js";import o from"../core/Handles.js";import{isSome as i,isNone as s}from"../core/maybe.js";import{watch as r,initial as a,on as n}from"../core/reactiveUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as l}from"../core/accessorSupport/decorators/cast.js";import{subclass as k}from"../core/accessorSupport/decorators/subclass.js";import{formatDate as m,convertDateFormatToIntlOptions as u}from"../intl/date.js";import{SlideThumbnail as h}from"../webdoc/support/SlideThumbnail.js";import c from"./Widget.js";import b from"./Bookmarks/BookmarksUserState.js";import _ from"./Bookmarks/BookmarksViewModel.js";import p from"./FeatureTable/Grid/support/ButtonMenu.js";import g from"./FeatureTable/Grid/support/ButtonMenuItem.js";import{Heading as B}from"./support/Heading.js";import{isActivationKey as v}from"./support/widgetUtils.js";import{messageBundle as f}from"./support/decorators/messageBundle.js";import{vmEvent as I}from"./support/decorators/vmEvent.js";import{tsx as E}from"./support/jsxFactory.js";import y from"sortablejs";function w(t,e,o){t.splice(o,0,t.splice(e,1)[0])}const S="bookmarks",x="data-bookmark-uid",T={base:"esri-bookmarks esri-widget--panel",loaderContainer:"esri-bookmarks__loader-container",loader:"esri-bookmarks__loader",fadeIn:"esri-bookmarks--fade-in",bookmarkList:"esri-bookmarks__list",bookmarkListSortable:"esri-bookmarks__list--sortable",bookmark:"esri-bookmarks__bookmark",bookmarkButton:"esri-bookmarks__bookmark-button",bookmarkImageContainer:"esri-bookmarks__bookmark-image-container",bookmarkEditButtonContainer:"esri-bookmarks__bookmark-edit-button-container",bookmarkEditButton:"esri-bookmarks__bookmark-edit-button",bookmarkDragHandle:"esri-bookmarks_bookmark-drag-handle",bookmarkDragHandleIcon:"esri-bookmarks_bookmark-drag-handle-icon",bookmarkIcon:"esri-bookmarks__bookmark-icon",bookmarkImage:"esri-bookmarks__image",bookmarkLabel:"esri-bookmarks__bookmark-label",bookmarkName:"esri-bookmarks__bookmark-name",bookmarkTimeExtent:"esri-bookmarks__bookmark-time-extent",bookmarkActive:"esri-bookmarks__bookmark--active",noBookmarksContainer:"esri-widget__content--empty",noBookmarksHeader:"esri-bookmarks__no-bookmarks-heading",noBookmarksIcon:"esri-widget__no-bookmark-icon",noBookmarksDescription:"esri-bookmarks__no-bookmarks-description",addingBookmark:"esri-bookmarks__adding-bookmark",addBookmark:"esri-bookmarks__add-bookmark",addBookmarkButton:"esri-bookmarks__add-bookmark-button",addBookmarkIcon:"esri-bookmarks__add-bookmark-icon",authoringCard:"esri-bookmarks__authoring-card",authoringContainer:"esri-bookmarks__authoring-container",authoringForm:"esri-bookmarks__authoring-form",authoringLabel:"esri-bookmarks__authoring-label",authoringActions:"esri-bookmarks__authoring-actions",authoringInputInvalid:"esri-bookmarks__authoring-input--invalid",authoringDeleteButton:"esri-bookmarks__authoring-delete-button",authoringCancelButton:"esri-bookmarks__authoring-cancel-button",timeExtentContainer:"esri-bookmarks__time-extent-container",timeExtent:"esri-bookmarks__time-extent",timeExtentGroup:"esri-bookmarks__time-extent-group",timeExtentDate:"esri-bookmarks__time-extent-date",timeExtentTime:"esri-bookmarks__time-extent-time",esriWidget:"esri-widget",esriWidgetDisabled:"esri-widget--disabled",esriButton:"esri-button",esriButtonTertiary:"esri-button--tertiary",esriInput:"esri-input",iconHandle:"esri-icon-handle-vertical",iconPlus:"esri-icon-plus",iconEdit:"esri-icon-edit",iconHandleHorizontal:"esri-icon-handle-horizontal",iconRefresh:"esri-icon-refresh",iconLink:"esri-icon-link",iconRemove:"esri-icon-erase",widgetIcon:"esri-icon-bookmark",header:"esri-widget__heading",loading:"esri-icon-loading-indicator",rotating:"esri-rotating"},A={addBookmark:!0,thumbnail:!0,time:!0},C=/^https:\/\/.*/i,U="esri.widgets.Bookmarks";let M=class extends c{constructor(t,e){super(t,e),this._handles=new o,this._addInputNode=null,this._editInputNode=null,this._urlEditInputNode=null,this._addBookmarkButtonNode=null,this._focusAddBookmarkButton=!1,this._focusEditInputBox=!1,this._focusAddInputBox=!1,this._focusUrlEditInputBox=!1,this._sortable=null,this._sortableNode=null,this._focusSortUid=null,this._selectedSortUid=null,this._sortableSavedItems=null,this._editIncludeTimeExtent=null,this._userState=null,this.disabled=!1,this.editingEnabled=!1,this.headingLevel=2,this.iconClass=T.widgetIcon,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new _,this.visibleElements={...A}}initialize(){this.addHandles([r((()=>this.viewModel?.bookmarks),(()=>this._bookmarksInitialized()),a),r((()=>this.editingEnabled),(()=>this._toggleSorting()),a)])}destroy(){this._destroySortable(),this._handles.destroy(),this._handles=null,this._editMenu.destroy()}loadDependencies(){return Promise.all([import("@esri/calcite-components/dist/components/calcite-label.js"),import("@esri/calcite-components/dist/components/calcite-switch.js")])}get _editMenuItems(){const{messages:t,_userState:e}=this,o=e?.editedBookmark?.thumbnail?.url;return[new g({label:t?.menu.refreshThumbnail,iconClass:T.iconRefresh,clickFunction:()=>this._refreshThumbnail()}),new g({label:C.test(o)?t?.menu.editImageUrl:t?.menu.useImageUrl,iconClass:T.iconLink,clickFunction:()=>this._startUseImageUrl()}),o?new g({label:t?.menu.removeThumbnail,iconClass:T.iconRemove,clickFunction:()=>this._removeThumbnail()}):null].filter(Boolean)}get _editMenu(){const{_editMenuItems:t,messages:e,disabled:o}=this,i=this._get("_editMenu");i&&i.destroy();const s=new p({disabled:o,iconClass:T.iconHandleHorizontal,label:e?.menu.label});return s.items=t,s}get defaultCreateOptions(){return this.viewModel.defaultCreateOptions}set defaultCreateOptions(t){this.viewModel.defaultCreateOptions=t}get defaultEditOptions(){return this.viewModel.defaultEditOptions}set defaultEditOptions(t){this.viewModel.defaultEditOptions=t}get bookmarks(){return this.viewModel.bookmarks}set bookmarks(t){this.viewModel.bookmarks=t}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(t){this.viewModel.goToOverride=t}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}castVisibleElements(t){return{...A,...t}}endAddBookmark(){this._userState=null}goTo(t){return this.viewModel.goTo(t)}render(){const{state:t}=this.viewModel,e="loading"===t?this.renderLoading():this.renderBookmarks();return E("div",{class:this.classes(T.base,T.esriWidget,{[T.esriWidgetDisabled]:this.disabled})},e)}startAddBookmark(){this._userState=new b({state:"add"}),this._focusAddInputBox=!0,this.scheduleRender()}renderLoading(){return E("div",{class:T.loaderContainer,key:"loader",tabIndex:this.disabled?-1:null},E("div",{class:T.loader}))}renderNoBookmarksContainer(){const{messages:t,disabled:e}=this;return E("div",{class:T.noBookmarksContainer,key:"no-bookmarks",tabIndex:e?-1:null},E("span",{"aria-hidden":"true",class:this.classes(T.noBookmarksIcon,T.widgetIcon)}),E(B,{level:this.headingLevel,class:this.classes(T.header,T.noBookmarksHeader)},t?.noBookmarksHeading),E("p",{class:T.noBookmarksDescription},t?.noBookmarksDescription))}renderAddBookmarkLoading(){return E("div",{key:"adding-bookmark",class:T.addingBookmark},E("span",{"aria-hidden":"true",class:this.classes(T.loading,T.rotating)}),this.messages?.addingBookmark)}renderBookmarkItems(t){if(!t)return null;const{_userState:e,editingEnabled:o}=this;return t.map((t=>o&&t&&e&&("edit"===e.state||"edit-thumbnail"===e.state)&&e.bookmark===t?"edit-thumbnail"===e.state?this.renderEditingBookmarkUrl(e.editedBookmark):this.renderEditingBookmark(e.editedBookmark):this.renderBookmark(t))).toArray()}renderBookmarksContainer(t){const{_userState:e,editingEnabled:o,disabled:i}=this,s="add"===e?.state,r=o&&!s?this.renderAddBookmarkButton():null,a=o?s&&e.loading?this.renderAddBookmarkLoading():"add"===e?.state?this.renderAddingBookmark():null:null;return[E("ul",{key:"bookmark-list","aria-label":this.messages?.widgetLabel,class:this.classes(T.bookmarkList,{[T.bookmarkListSortable]:this.editingEnabled}),afterCreate:this._sortNodeCreated,afterRemoved:this._destroySortable,"data-node-ref":"_sortableNode",bind:this,tabIndex:i?-1:null},this.renderBookmarkItems(t)),r,a]}renderAddBookmarkButton(){return this.visibleElements.addBookmark?E("div",{key:"add-bookmark-item",class:T.addBookmark},E("button",{class:this.classes(T.esriButton,T.esriButtonTertiary,T.addBookmarkButton),disabled:this.disabled,onclick:this.startAddBookmark,afterCreate:this._storeAddBookmarkButton,afterUpdate:this._storeAddBookmarkButton,"data-node-ref":"_addBookmarkButtonNode",bind:this,type:"button"},E("span",{"aria-hidden":"true",class:this.classes(T.addBookmarkIcon,T.iconPlus)}),this.messages?.addBookmark)):null}renderBookmarks(){const{bookmarks:t}=this.viewModel,e=t&&t.filter(Boolean),o=e&&e.length,i=o||this.editingEnabled?this.renderBookmarksContainer(e):null;return[o?null:this.renderNoBookmarksContainer(),i]}renderEditContainer(t){const{messagesCommon:e,disabled:o}=this,i=this._getBookmarkTitle(t);return E("div",{class:T.bookmarkEditButtonContainer,key:"edit-container"},E("button",{disabled:o,title:`${e?.edit} ${i}`,"aria-label":`${e?.edit} ${i}`,"data-bookmark":t,onclick:this._showEditBookmarkForm,bind:this,class:T.bookmarkEditButton,type:"button"},E("span",{"aria-hidden":"true",class:T.iconEdit})))}renderDragHandle(t){const{messagesCommon:e,disabled:o}=this,i=this._getBookmarkTitle(t),s={[x]:t.uid};return E("div",{role:"button",tabIndex:o?-1:0,key:"drag-handle",bind:this,class:T.bookmarkDragHandle,onkeydown:this._dragHandleKeydown,afterCreate:this._focusDragHandle,afterUpdate:this._focusDragHandle,onblur:this._dragHandleBlur,"aria-pressed":this._selectedSortUid===t.uid?"true":"false","aria-label":`${e?.dragHandleTitle} ${i}`,title:`${e?.dragHandleTitle} ${i}`,...s},E("span",{"aria-hidden":"true",class:this.classes(T.bookmarkDragHandleIcon,T.iconHandle)}))}renderBookmarkImageIcon(){return E("span",{"aria-hidden":"true",class:this.classes(T.bookmarkIcon,T.widgetIcon)})}renderBookmarkImage(t){const{visibleElements:e}=this,{thumbnail:o}=t,i=o&&o.url||"";return e.thumbnail&&i?E("img",{src:i,alt:"",class:T.bookmarkImage}):null}renderBookmarkTimeSwitch(t){const{messages:e,disabled:o}=this,{timeExtent:i}=t,{view:s}=this.viewModel;return s.timeExtent||i?E("calcite-label",{layout:"inline-space-between","disable-spacing":"true"},e.includeTimeExtent,E("calcite-switch",{scale:"s",disabled:o,checked:!!i,onCalciteSwitchChange:t=>this._editIncludeTimeExtent=!!t.detail.switched})):null}renderBookmarkTimeExtent(t){const{visibleElements:e}=this,{timeExtent:o}=t;return o?E("span",{class:T.timeExtent},[i(o.start)&&E("span",{key:"start-date-group",class:T.timeExtentGroup},E("span",{key:"start-date",class:T.timeExtentDate},this._formatDate(o.start)),e.time&&E("span",{key:"start-time",class:T.timeExtentTime},this._formatTime(o.start))),i(o.end)&&(s(o.start)||o.start.getTime()!==o.end.getTime())&&E("span",{key:"end-date-group",class:T.timeExtentGroup},E("span",{key:"end-date",class:T.timeExtentDate},this._formatDate(o.end)),e.time&&E("span",{key:"end-time",class:T.timeExtentTime},this._formatTime(o.end)))]):null}renderBookmarkButton(t){const{disabled:e}=this,{timeExtent:o}=t,{abilities:i}=this.viewModel,s=this._getBookmarkTitle(t),r=E("div",{class:T.bookmarkImageContainer},this.renderBookmarkImage(t)||this.renderBookmarkImageIcon()),a=i.time&&o?E("span",{key:"time-extent",class:T.bookmarkTimeExtent},this.renderBookmarkTimeExtent(t)):null;return E("button",{disabled:e,key:"bookmark-button",class:T.bookmarkButton,bind:this,"data-bookmark":t,onclick:this._goToBookmark,type:"button"},r,E("div",{class:T.bookmarkLabel},E("span",{key:"bookmark-title",class:T.bookmarkName},s),a))}renderBookmark(t){const{activeBookmark:e}=this.viewModel,o={[T.bookmarkActive]:e===t},i=this.editingEnabled?this.renderEditContainer(t):null,s={[x]:t.uid},r=this.editingEnabled?this.renderDragHandle(t):null;return E("li",{key:t,class:this.classes(T.bookmark,o),...s},r,this.renderBookmarkButton(t),i)}renderEditingBookmarkName(t){const{messages:e,_userState:o,disabled:i}=this,s="name-required"===o.validationState;return E("label",{class:T.authoringLabel},e?.title,s?E("strong",null,e?.invalidTitle):null,E("input",{required:!0,disabled:i,bind:this,class:this.classes(T.esriInput,s?T.authoringInputInvalid:null),type:"text",value:t.name,afterCreate:this._storeEditInput,afterUpdate:this._focusEditInput,"data-bookmark":t,"data-node-ref":"_editInputNode",placeholder:e?.titlePlaceholder}))}renderEditingBookmarkUrlActions(){const{messagesCommon:t,disabled:e}=this;return E("div",{class:T.authoringActions},E("input",{type:"button",disabled:e,value:t?.back,class:this.classes(T.esriButton,T.esriButtonTertiary),onclick:this._closeUrlEditBookmarkForm,bind:this}),E("input",{class:T.esriButton,disabled:e,type:"submit",value:t?.add}))}renderEditingBookmarkActions(){const{messagesCommon:t,disabled:e}=this,{bookmark:o}=this._userState;return E("div",{class:T.authoringActions},E("input",{type:"button",disabled:e,value:t?.delete,class:this.classes(T.esriButton,T.esriButtonTertiary,T.authoringDeleteButton),"data-bookmark":o,onclick:this._deleteBookmark,bind:this}),E("input",{disabled:e,type:"button",value:t?.cancel,class:this.classes(T.esriButton,T.esriButtonTertiary),onclick:this._closeEditBookmarkForm,bind:this}),E("input",{class:T.esriButton,disabled:e,type:"submit",value:t?.save}))}renderEditingBookmarkUrlInput(t){const{messages:e,_userState:o,disabled:i}=this,s=t.thumbnail?.url,r=C.test(s)?s:null,a="absolute-url-required"===o.validationState;return E("label",{class:T.authoringLabel},a?E("strong",null,e?.invalidImageUrl):null,E("input",{required:!0,disabled:i,bind:this,class:this.classes(T.esriInput,a?T.authoringInputInvalid:null),type:"text",value:r,afterCreate:this._storeUrlEditInput,afterUpdate:this._focusUrlEditInput,"data-bookmark":t,"data-node-ref":"_urlEditInputNode",title:e?.imageUrlTooltip,placeholder:e&&`https://<${e.imageUrlPlaceholder}>`}))}renderEditingBookmarkUrl(t){const e={[x]:t.uid};return E("li",{key:"edit-bookmark-url-form",class:T.authoringCard,...e},E("form",{class:T.authoringForm,disabled:this.disabled,onsubmit:this._editBookmarkUrlSubmit,bind:this},this.renderEditingBookmarkUrlInput(t),this.renderEditingBookmarkUrlActions()))}renderEditingBookmark(t){const e={[x]:t.uid},{abilities:o}=this.viewModel,i=o.time?E("div",{key:"edit-bookmark-time-container",class:T.timeExtentContainer},this.renderBookmarkTimeSwitch(t),this._editIncludeTimeExtent&&this.renderBookmarkTimeExtent(t)):null;return E("li",{key:"edit-bookmark-form",class:T.authoringCard,...e},E("form",{class:T.authoringForm,disabled:this.disabled,onsubmit:this._editBookmarkSubmit,bind:this},E("div",{class:T.authoringContainer},E("div",{class:T.bookmarkImageContainer},this.renderBookmarkImage(t),this._editMenu.render()),this.renderEditingBookmarkName(t)),i,this.renderEditingBookmarkActions()))}renderAddingBookmarkName(){const{_userState:t,messages:e,disabled:o}=this,i="name-required"===t.validationState;return E("label",{class:T.authoringLabel},e?.title,i?E("strong",null,e?.invalidTitle):null,E("input",{required:!0,disabled:o,bind:this,class:this.classes(T.esriInput,i?T.authoringInputInvalid:null),type:"text",afterCreate:this._storeAddInput,afterUpdate:this._focusAddInput,"data-node-ref":"_addInputNode",value:"",placeholder:e?.titlePlaceholder}))}renderAddingBookmarkActions(){const{messagesCommon:t,disabled:e}=this;return E("div",{class:this.classes(T.authoringActions)},E("input",{type:"button",disabled:e,value:t?.cancel,class:this.classes(T.esriButton,T.esriButtonTertiary,T.authoringCancelButton),onclick:this._endAddBookmark.bind(this),bind:this}),E("input",{class:T.esriButton,disabled:e,type:"submit",value:t?.add}))}renderAddingBookmark(){return E("div",{key:"add-bookmark-form",class:T.authoringCard},E("form",{class:T.authoringForm,onsubmit:this._addBookmarkSubmit,bind:this},this.renderAddingBookmarkName(),this.renderAddingBookmarkActions()))}_getBookmarkTitle(t){return t.name||this.messagesCommon?.untitled}_formatDate(t){return t?m(t,u("short-date")):null}_formatTime(t){return t?m(t,u("long-time")):null}_dragHandleBlur(){this._selectedSortUid=null,this.scheduleRender()}_dragHandleKeydown(t){const{_sortableSavedItems:o}=this,i=["ArrowDown","ArrowUp","Escape","Tab"," ","Enter"],s=e(t);if(!i.includes(s))return;const{_sortable:r,_selectedSortUid:a}=this,n=r.toArray(),d=t.target.getAttribute(x),l=n.indexOf(d);if(v(s)){const t=a&&a===d;return this._selectedSortUid=t?null:d,this._sortableSavedItems=t?null:this._sortable.toArray(),void this.scheduleRender()}if("Tab"===s)return this._selectedSortUid=null,void this.scheduleRender();if("Escape"===s&&o)return t.stopPropagation(),this._selectedSortUid=null,this._updateSortItems(o,r,d),void this.scheduleRender();if(-1===l||!a)return;const k="ArrowUp"===s?l-1:l+1;k>=n.length||k<=-1||(w(n,l,k),this._updateSortItems(n,r,d))}_updateSortItems(t,e,o){e.sort(t),this._sortBookmarks(e),this._focusSortUid=o,this._selectedSortUid=o}_focusDragHandle(t){const{_focusSortUid:e}=this;if(!t||!e)return;t.getAttribute(x)===e&&(t.focus(),this._focusSortUid=null)}_toggleSorting(){const{_sortable:t,_sortableNode:e,editingEnabled:o,disabled:i}=this;if(e)if(t)t.option("disabled",i||!o);else{const t=y.create(e,{dataIdAttr:x,handle:`.${T.bookmarkDragHandle}`,group:S,disabled:i||!o,onSort:()=>this._sortBookmarks(t)});this._sortable=t}}_sortNodeCreated(t){this._sortableNode=t,this._toggleSorting()}_sortBookmarks(t){const{bookmarks:e}=this.viewModel;if(!e)return;const o=t.toArray();e.sort(((t,e)=>{const i=o.indexOf(t.uid),s=o.indexOf(e.uid);return i>s?1:i<s?-1:0}))}_destroySortable(){const{_sortable:t}=this;t&&t.destroy(),this._sortable=null}_endAddBookmark(){this._focusAddBookmarkButton=!0,this.endAddBookmark()}_bookmarksInitialized(){const t="bookmarks-init",{_handles:e}=this;e.remove(t),e.add(n((()=>this.viewModel?.bookmarks),"change",(()=>this._bookmarksChanged())),t)}_bookmarksChanged(){const t="bookmarks-change",{bookmarks:e}=this.viewModel,{_handles:o}=this;o.remove(t);const i=e.map((t=>r((()=>[t?.name,t?.thumbnail?.url]),(()=>this.scheduleRender()))));o.add(i,t),this.scheduleRender()}_showEditBookmarkForm(t){const e=t.currentTarget["data-bookmark"];this._editIncludeTimeExtent=!!e.timeExtent,this._focusEditInputBox=!0,this._userState=new b({bookmark:e,state:"edit"}),this.viewModel.goTo(e),this.scheduleRender()}_closeUrlEditBookmarkForm(){this._focusEditInputBox=!0,this._userState.state="edit"}_closeEditBookmarkForm(){this._userState=null}_addBookmarkSubmit(t){t.preventDefault();const{_addInputNode:e,_userState:o}=this,i=e&&e.value.trim();i?(o.loading=!0,this.viewModel.createBookmark().then((t=>{t.name=i,this.viewModel.bookmarks.add(t),this._endAddBookmark()}))):o.validationState="name-required"}async _editBookmarkAndClose(t,e){const{viewModel:o}=this;await o.editBookmark(t,{...o.defaultEditOptions,...e}),this._closeEditBookmarkForm()}_editBookmarkSubmit(t){t.preventDefault();const{_editInputNode:e,_userState:o,_editIncludeTimeExtent:i}=this,s=e&&e.value.trim();s?(o.bookmark.name=s,o.bookmark.thumbnail=o.editedBookmark.thumbnail,i||(o.bookmark.timeExtent=null),this._editBookmarkAndClose(o.bookmark,{takeScreenshot:!1,captureTimeExtent:i})):o.validationState="name-required"}_storeAddBookmarkButton(t){this._addBookmarkButtonNode=t,this._focusAddBookmark()}_storeEditInput(t){this._editInputNode=t,this._focusEditInput()}_storeAddInput(t){this._addInputNode=t,this._focusAddInput()}_storeUrlEditInput(t){this._urlEditInputNode=t,this._focusUrlEditInput()}_focusUrlEditInput(){this._urlEditInputNode&&this._focusUrlEditInputBox&&(this._focusUrlEditInputBox=!1,this._urlEditInputNode.focus())}_focusAddInput(){this._addInputNode&&this._focusAddInputBox&&(this._focusAddInputBox=!1,this._addInputNode.focus())}_focusAddBookmark(){this._addBookmarkButtonNode&&this._focusAddBookmarkButton&&(this._focusAddBookmarkButton=!1,this._addBookmarkButtonNode.focus())}_focusEditInput(){this._editInputNode&&this._focusEditInputBox&&(this._focusEditInputBox=!1,this._editInputNode.focus())}_deleteBookmark(t){const e=t.currentTarget["data-bookmark"];this.viewModel.bookmarks.remove(e)}_goToBookmark(t){const e=t.currentTarget["data-bookmark"];this.endAddBookmark(),this._closeEditBookmarkForm(),this.viewModel.goTo(e)}async _refreshThumbnail(){const{_userState:t,_editMenu:e,viewModel:o}=this;t.validationState=void 0,await o.editBookmark(this._userState.editedBookmark,{takeScreenshot:!0,captureViewpoint:!1,captureRotation:!1,captureScale:!1,captureTimeExtent:!1}),e.open=!1,this._focusEditInputBox=!0,this.scheduleRender()}_removeThumbnail(){const{_userState:t,_editMenu:e}=this;t.editedBookmark.thumbnail=null,t.validationState=void 0,e.open=!1,this._focusEditInputBox=!0,this.scheduleRender()}_startUseImageUrl(){this._userState.state="edit-thumbnail",this._editMenu.open=!1,this._focusUrlEditInputBox=!0,this.scheduleRender()}_editBookmarkUrlSubmit(t){t.preventDefault();const{_urlEditInputNode:e,_userState:o}=this,i=e.value;C.test(i)?(i&&(o.editedBookmark.thumbnail=new h({url:i})),this._closeUrlEditBookmarkForm()):o.validationState="absolute-url-required"}};t([d()],M.prototype,"_editIncludeTimeExtent",void 0),t([d({type:b})],M.prototype,"_userState",void 0),t([d({readOnly:!0})],M.prototype,"_editMenuItems",null),t([d({readOnly:!0})],M.prototype,"_editMenu",null),t([d()],M.prototype,"defaultCreateOptions",null),t([d()],M.prototype,"defaultEditOptions",null),t([d()],M.prototype,"bookmarks",null),t([d()],M.prototype,"disabled",void 0),t([d()],M.prototype,"editingEnabled",void 0),t([d()],M.prototype,"headingLevel",void 0),t([d()],M.prototype,"goToOverride",null),t([d()],M.prototype,"iconClass",void 0),t([d()],M.prototype,"label",null),t([d(),f("esri/widgets/Bookmarks/t9n/Bookmarks")],M.prototype,"messages",void 0),t([d(),f("esri/t9n/common")],M.prototype,"messagesCommon",void 0),t([d(),f("esri/core/t9n/Units")],M.prototype,"messagesUnits",void 0),t([d()],M.prototype,"uiStrings",void 0),t([d()],M.prototype,"view",null),t([d({type:_}),I(["select-bookmark","bookmark-edit","bookmark-select"])],M.prototype,"viewModel",void 0),t([d()],M.prototype,"visibleElements",void 0),t([l("visibleElements")],M.prototype,"castVisibleElements",null),t([d()],M.prototype,"endAddBookmark",null),t([d()],M.prototype,"startAddBookmark",null),M=t([k(U)],M);const N=M;export{N as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{getAssetUrl as t}from"../../assets.js";import r from"../../config.js";import s from"../../Graphic.js";import o from"../../PopupTemplate.js";import"../../symbols.js";import i from"../../core/Accessor.js";import l from"../../core/Collection.js";import{deprecatedProperty as a}from"../../core/deprecate.js";import n from"../../core/Error.js";import u from"../../core/Evented.js";import c from"../../core/Handles.js";import h from"../../core/Logger.js";import{unwrap as p,isSome as d,isNone as g}from"../../core/maybe.js";import{eachAlways as m,after as y}from"../../core/promiseUtils.js";import{watch as f,whenOnce as S,initial as _}from"../../core/reactiveUtils.js";import{property as v}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as b}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/Point.js";import x from"../../geometry/SpatialReference.js";import{onLocaleChange as I}from"../../intl/locale.js";import{fetchMessageBundle as L}from"../../intl/messages.js";import T from"../../portal/Portal.js";import{highlightsSupported as j}from"../../views/support/layerViewUtils.js";import R from"./LayerSearchSource.js";import E from"./LocatorSearchSource.js";import P from"./SearchSource.js";import{getPointFromGeometry as F,getPointWithElevation as C}from"./support/geometryUtils.js";import{isArcGISWorldGeocoder as G,meteredArcGISLocatorUrl as O,isProxiedArcGISWorldGeocoder as A,isMeteredArcGISWorldGeocoder as N}from"./support/locatorUtils.js";import{supported as D,getCurrentPosition as M,positionToPoint as V}from"../support/geolocationUtils.js";import{GoToMixin as k}from"../support/GoTo.js";import B from"../../symbols/PictureMarkerSymbol.js";import J from"../../symbols/SimpleLineSymbol.js";import U from"../../symbols/SimpleFillSymbol.js";import H from"../../symbols/TextSymbol.js";function Q(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const Z=()=>L("esri/widgets/Search/t9n/Search"),q="esri.widgets.Search.SearchViewModel",z=h.getLogger(q),K="highlight",W=l.ofType({key:e=>e.layer?"layer":"locator",base:P,typeMap:{layer:R,locator:E}}),X=x.WGS84,Y="esri/images/search/search-symbol-32.png",$=/<(?:.|\s)*?>/g,ee=-1;let te=class extends(k(u.EventedMixin(i))){constructor(e){super(e),this._handles=new c,this._gotoController=null,this._searching=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new W,this.defaultSymbols={point:new B({url:t(Y),size:24,width:24,height:24}),polyline:new J({color:[130,130,130,1],width:2}),polygon:new U({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=T.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new W,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await Z();this.messages=e,this.defaultPopupTemplate=new o({title:e.searchResult,content:"{Match_addr}"})};e(),this._handles.add([f((()=>[this.includeDefaultSources,this.view,this.portal]),(()=>this._update()),_),I(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics(),this._handles.destroy(),this._handles=null}get activeSource(){return this.allSources.at(this.activeSourceIndex)??null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:ee}set activeSourceIndex(e){this._overrideIfSome("activeSourceIndex",e)}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){this._overrideIfSome("allPlaceholder",e)}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new W;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get defaultSymbol(){return a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._get("defaultSymbol")}set defaultSymbol(e){a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._set("defaultSymbol",e)}get locationEnabled(){return this._get("locationEnabled")||D()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=D();if(e&&!t){const e=new n("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});z.error(e)}this._override("locationEnabled",!!e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===ee)return r;const s=e.at(t);return s?s.placeholder:""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup(),this.view&&this.view.graphics.remove(this.resultGraphic),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=this.when().then((()=>this._getResultsFromSources(r,t).then((e=>{if(p(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text,numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=(r.location&&o?o.name:r.text).replace($,"");return this._set("searchTerm",i),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("search-complete",s),this._selectFirstResult(o).then((()=>s))})))).then((e=>(this._clearSearching(),e)),(e=>{throw this._clearSearching(),e}));return this._searching=s,s}searchNearby(e){if(!this.locationEnabled){const e=new n("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});return z.error(e),Promise.reject(e)}const t=M().then((t=>V({position:t,view:this.view},e))).then((t=>this.search(t,e)));return this._searching=t,t.catch((()=>{})).then((()=>this._clearSearching())),t}select(e){if(this.clearGraphics(),!e){const t=new n("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});return z.error(t),Promise.reject(t)}const{view:t}=this,r=Q(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=this.allSources.at(r);if(!o){const e=new n("select:missing-source","Cannot select without a source.",{source:o});return z.error(e),Promise.reject(e)}const i=o instanceof R?this._getLayerSourcePopupTemplate(o):o.popupTemplate,l=o.resultSymbol||this._getDefaultSymbol(e),a=Q(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,u=Q(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,c=Q(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,h=c?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:p}=e;if(!p){const e=new n("select:missing-feature","Cannot select without a feature.",{feature:p});return z.error(e),Promise.reject(e)}const{attributes:g,geometry:y,layer:f,sourceLayer:S}=p,_=F(y),v={layerViewQuery:this._getLayerView(p),elevationQuery:t&&d(_)?C(_,t).catch((()=>_)):Promise.resolve(_)};return m(v).then((i=>{const n=i.layerViewQuery.value,m=i.elevationQuery.value;l instanceof H&&(l.text=e.name);const _=t&&u?e.target||e.extent:null;return(d(_)?this._goToSearchResult(_):Promise.resolve()).then((()=>{const i=n?p:new s({geometry:y,symbol:l,attributes:g,layer:f,sourceLayer:S,popupTemplate:h}),u=c&&this.view?.popup,d=u&&i.getEffectivePopupTemplate(u.defaultPopupTemplateEnabled);return d&&t.popup.open({features:[i],location:m}),n&&j(n)&&!d&&this._highlightFeature({graphic:i,layerView:n}),!n&&a&&t&&t.graphics.push(i),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",i),this.emit("select-result",{result:e,source:o,sourceIndex:r}),e}))}))}suggest(e,t,r){const s=e||this.searchTerm;return this.emit("suggest-start",{searchTerm:s}),this._suggestTimer(t,r).then((()=>this._suggestImmediate(s,r).then((e=>(this._set("suggestions",e.results),this._set("suggestionCount",e.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("suggest-complete",e),e)))))}async when(){await S((()=>!this.updating))}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=m([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await S((()=>this.messages)),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map((e=>{if(!1===e.placefinding)return;const t=r.apiKey&&G(e.url)?{url:O}:null,s=E.fromJSON({...e,...t}),o=s.url;if(G(o)||A(o)||N(o)){const e=s.outFields||["Addr_type","Match_addr","StAddr","City"],t=s.placeholder||this.messages.placeholder,r="number"==typeof s.defaultZoomScale?s.defaultZoomScale:2500;s.set({singleLineFieldName:"SingleLine",outFields:e,placeholder:t,defaultZoomScale:r})}return s.singleLineFieldName?s:void 0})).filter(Boolean)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach((e=>e?.destroy())),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=R.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=R.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find((e=>e.id===t.subLayer));if(!r)throw new Error;const s=await r.createFeatureLayer();return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find((e=>e.id===t.subLayer));if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}_getLayer(e,t){return"feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type?Promise.resolve(e):"map-image"===e.type?this._getSubLayer(e,t).catch((()=>{const t=new n("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return z.error(t),null})):"building-scene"===e.type?this._getBuildingSubLayer(e,t):Promise.resolve(null)}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const{selectedFeature:r}=e;r&&r===t&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return y(r,null,t&&t.signal)}_createLocationForSearch(e){return e instanceof s?F(e.geometry):e instanceof w?e:Array.isArray(e)&&2===e.length?new w({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&Q(e,"key")&&Q(e,"text")&&Q(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:p(t),text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){let t=null;return e&&e.some((e=>{const{results:r}=e,s=r[0],o=!!s;return o&&(t=s),o})),t}_selectFirstResult(e){return this.autoSelect&&e?this.select(e):Promise.resolve(null)}_suggestImmediate(e,t){return this.when().then((()=>this._getSuggestionsFromSources(e,t))).then((r=>{if(p(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e,numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}))}_formatSourceResponse(e,t,r){const s=t&&t.value||[],o=t&&t.error,i=this.allSources.at(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),z.error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===ee){const s=r&&Q(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach(((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)}))}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}_getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&Q(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new n("search:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===ee?r.forEach(((r,s)=>{o.push(this._getResultsFromSource(e,s,t))})):o.push(this._getResultsFromSource(e,s,t)),m(o)}_getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new n("suggest:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===ee?r.forEach(((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))})):o.push(this._getSuggestionsFromSource(e,s,t)),m(o)}_getResultsFromSource(e,t,r){const s=this.allSources.at(t),{location:o=null}=e,i=this.view?.spatialReference||X,l=Q(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults({view:n,sourceIndex:t,location:o,suggestResult:e,spatialReference:i,exactMatch:a,maxResults:l},r)}_getSuggestionsFromSource(e,t,r){const s=this.allSources.at(t),o=Q(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e.length,l=Q(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||X,i=Q(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return Promise.resolve(null)}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return Q(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){const t=this.results;let r=null;return t.some((t=>t.results.some((s=>s===e&&(r=t.sourceIndex,!0))))),r}async _goToSearchResult(e){const t=!!e;this._abortGoTo();const r=new AbortController;this._gotoController=r;const s={target:{target:e},options:{animate:t,signal:r.signal}};await this.callGoTo(s),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(g(r))return null;const s=this._get("defaultSymbol");if(s&&("point"===r.type||"multipoint"===r.type))return s;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this._handles.remove(K)}async _getLayerView(e){const{view:t}=this;if(!e||!t||"building-component"===e.layer.type||"subtype-sublayer"===e.layer.type)return null;const{layer:r}=e;return await t.when(),t.whenLayerView(r)}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o}=t,{objectIdField:i}=o,l=s&&s[i],a=r.highlight(l||t);this._handles.add(a,K)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t.emit("select-result-floor",e)}}};te.ALL_INDEX=ee,e([v()],te.prototype,"_searching",void 0),e([v()],te.prototype,"_updatingPromise",void 0),e([v({readOnly:!0,value:null})],te.prototype,"activeSource",null),e([v()],te.prototype,"activeSourceIndex",null),e([v()],te.prototype,"allPlaceholder",null),e([v({readOnly:!0})],te.prototype,"allSources",null),e([v()],te.prototype,"autoNavigate",void 0),e([v()],te.prototype,"autoSelect",void 0),e([v()],te.prototype,"defaultPopupTemplate",void 0),e([v({readOnly:!0})],te.prototype,"defaultSources",void 0),e([v()],te.prototype,"defaultSymbol",null),e([v()],te.prototype,"defaultSymbols",void 0),e([v()],te.prototype,"includeDefaultSources",void 0),e([v()],te.prototype,"locationEnabled",null),e([v()],te.prototype,"maxInputLength",void 0),e([v()],te.prototype,"maxResults",void 0),e([v()],te.prototype,"maxSuggestions",void 0),e([v()],te.prototype,"messages",void 0),e([v()],te.prototype,"minSuggestCharacters",void 0),e([v({readOnly:!0})],te.prototype,"placeholder",null),e([v()],te.prototype,"popupEnabled",void 0),e([v({type:o})],te.prototype,"popupTemplate",void 0),e([v({type:T})],te.prototype,"portal",void 0),e([v()],te.prototype,"resultCount",void 0),e([v()],te.prototype,"resultGraphicEnabled",void 0),e([v({readOnly:!0})],te.prototype,"resultGraphic",void 0),e([v({readOnly:!0})],te.prototype,"results",void 0),e([v({readOnly:!0})],te.prototype,"selectedSuggestion",void 0),e([v()],te.prototype,"searchAllEnabled",void 0),e([v({readOnly:!0})],te.prototype,"selectedResult",void 0),e([v()],te.prototype,"searchTerm",null),e([v({type:W})],te.prototype,"sources",void 0),e([v({readOnly:!0})],te.prototype,"state",null),e([v()],te.prototype,"suggestionDelay",void 0),e([v()],te.prototype,"suggestionCount",void 0),e([v({readOnly:!0})],te.prototype,"suggestions",void 0),e([v()],te.prototype,"suggestionsEnabled",void 0),e([v({readOnly:!0})],te.prototype,"updating",null),e([v()],te.prototype,"view",void 0),e([v()],te.prototype,"clear",null),te=e([b(q)],te);const re=te;export{re as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{getAssetUrl as t}from"../../assets.js";import r from"../../config.js";import s from"../../Graphic.js";import o from"../../PopupTemplate.js";import"../../symbols.js";import i from"../../core/Accessor.js";import l from"../../core/Collection.js";import a from"../../core/Error.js";import n from"../../core/Evented.js";import u from"../../core/Handles.js";import c from"../../core/Logger.js";import{unwrap as h,isSome as p,isNone as g}from"../../core/maybe.js";import{eachAlways as d,after as m}from"../../core/promiseUtils.js";import{watch as y,whenOnce as f,initial as S}from"../../core/reactiveUtils.js";import{property as _}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/Point.js";import b from"../../geometry/SpatialReference.js";import{onLocaleChange as x}from"../../intl/locale.js";import{fetchMessageBundle as I}from"../../intl/messages.js";import L from"../../portal/Portal.js";import{highlightsSupported as T}from"../../views/support/layerViewUtils.js";import j from"./LayerSearchSource.js";import R from"./LocatorSearchSource.js";import E from"./SearchSource.js";import{getPointFromGeometry as P,getPointWithElevation as F}from"./support/geometryUtils.js";import{isArcGISWorldGeocoder as C,meteredArcGISLocatorUrl as G,isProxiedArcGISWorldGeocoder as O,isMeteredArcGISWorldGeocoder as A}from"./support/locatorUtils.js";import{supported as N,getCurrentPosition as D,positionToPoint as M}from"../support/geolocationUtils.js";import{GoToMixin as V}from"../support/GoTo.js";import k from"../../symbols/PictureMarkerSymbol.js";import B from"../../symbols/SimpleLineSymbol.js";import J from"../../symbols/SimpleFillSymbol.js";import U from"../../symbols/TextSymbol.js";function H(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const Q=()=>I("esri/widgets/Search/t9n/Search"),Z="esri.widgets.Search.SearchViewModel",q=c.getLogger(Z),z="highlight",K=l.ofType({key:e=>e.layer?"layer":"locator",base:E,typeMap:{layer:j,locator:R}}),W=b.WGS84,X="esri/images/search/search-symbol-32.png",Y=/<(?:.|\s)*?>/g,$=-1;let ee=class extends(V(n.EventedMixin(i))){constructor(e){super(e),this._handles=new u,this._gotoController=null,this._searching=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new K,this.defaultSymbols={point:new k({url:t(X),size:24,width:24,height:24}),polyline:new B({color:[130,130,130,1],width:2}),polygon:new J({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=L.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new K,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await Q();this.messages=e,this.defaultPopupTemplate=new o({title:e.searchResult,content:"{Match_addr}"})};e(),this._handles.add([y((()=>[this.includeDefaultSources,this.view,this.portal]),(()=>this._update()),S),x(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics(),this._handles.destroy(),this._handles=null}get activeSource(){return this.allSources.at(this.activeSourceIndex)??null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:$}set activeSourceIndex(e){this._overrideIfSome("activeSourceIndex",e)}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){this._overrideIfSome("allPlaceholder",e)}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new K;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get locationEnabled(){return this._get("locationEnabled")||N()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=N();if(e&&!t){const e=new a("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});q.error(e)}this._override("locationEnabled",!!e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===$)return r;const s=e.at(t);return s?s.placeholder:""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup(),this.view&&this.view.graphics.remove(this.resultGraphic),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=this.when().then((()=>this._getResultsFromSources(r,t).then((e=>{if(h(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text,numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=(r.location&&o?o.name:r.text).replace(Y,"");return this._set("searchTerm",i),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("search-complete",s),this._selectFirstResult(o).then((()=>s))})))).then((e=>(this._clearSearching(),e)),(e=>{throw this._clearSearching(),e}));return this._searching=s,s}searchNearby(e){if(!this.locationEnabled){const e=new a("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});return q.error(e),Promise.reject(e)}const t=D().then((t=>M({position:t,view:this.view},e))).then((t=>this.search(t,e)));return this._searching=t,t.catch((()=>{})).then((()=>this._clearSearching())),t}select(e){if(this.clearGraphics(),!e){const t=new a("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});return q.error(t),Promise.reject(t)}const{view:t}=this,r=H(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=this.allSources.at(r);if(!o){const e=new a("select:missing-source","Cannot select without a source.",{source:o});return q.error(e),Promise.reject(e)}const i=o instanceof j?this._getLayerSourcePopupTemplate(o):o.popupTemplate,l=o.resultSymbol||this._getDefaultSymbol(e),n=H(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,u=H(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,c=H(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,h=c?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:g}=e;if(!g){const e=new a("select:missing-feature","Cannot select without a feature.",{feature:g});return q.error(e),Promise.reject(e)}const{attributes:m,geometry:y,layer:f,sourceLayer:S}=g,_=P(y),v={layerViewQuery:this._getLayerView(g),elevationQuery:t&&p(_)?F(_,t).catch((()=>_)):Promise.resolve(_)};return d(v).then((i=>{const a=i.layerViewQuery.value,d=i.elevationQuery.value;l instanceof U&&(l.text=e.name);const _=t&&u?e.target||e.extent:null;return(p(_)?this._goToSearchResult(_):Promise.resolve()).then((()=>{const i=a?g:new s({geometry:y,symbol:l,attributes:m,layer:f,sourceLayer:S,popupTemplate:h}),u=c&&this.view?.popup,p=u&&i.getEffectivePopupTemplate(u.defaultPopupTemplateEnabled);return p&&t.popup.open({features:[i],location:d}),a&&T(a)&&!p&&this._highlightFeature({graphic:i,layerView:a}),!a&&n&&t&&t.graphics.push(i),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",i),this.emit("select-result",{result:e,source:o,sourceIndex:r}),e}))}))}suggest(e,t,r){const s=e||this.searchTerm;return this.emit("suggest-start",{searchTerm:s}),this._suggestTimer(t,r).then((()=>this._suggestImmediate(s,r).then((e=>(this._set("suggestions",e.results),this._set("suggestionCount",e.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("suggest-complete",e),e)))))}async when(){await f((()=>!this.updating))}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=d([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await f((()=>this.messages)),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map((e=>{if(!1===e.placefinding)return;const t=r.apiKey&&C(e.url)?{url:G}:null,s=R.fromJSON({...e,...t}),o=s.url;if(C(o)||O(o)||A(o)){const e=s.outFields||["Addr_type","Match_addr","StAddr","City"],t=s.placeholder||this.messages.placeholder,r="number"==typeof s.defaultZoomScale?s.defaultZoomScale:2500;s.set({singleLineFieldName:"SingleLine",outFields:e,placeholder:t,defaultZoomScale:r})}return s.singleLineFieldName?s:void 0})).filter(Boolean)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach((e=>e?.destroy())),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=j.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=j.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find((e=>e.id===t.subLayer));if(!r)throw new Error;const s=await r.createFeatureLayer();return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find((e=>e.id===t.subLayer));if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}_getLayer(e,t){return"feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type?Promise.resolve(e):"map-image"===e.type?this._getSubLayer(e,t).catch((()=>{const t=new a("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return q.error(t),null})):"building-scene"===e.type?this._getBuildingSubLayer(e,t):Promise.resolve(null)}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const{selectedFeature:r}=e;r&&r===t&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return m(r,null,t&&t.signal)}_createLocationForSearch(e){return e instanceof s?P(e.geometry):e instanceof w?e:Array.isArray(e)&&2===e.length?new w({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&H(e,"key")&&H(e,"text")&&H(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:h(t),text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){let t=null;return e&&e.some((e=>{const{results:r}=e,s=r[0],o=!!s;return o&&(t=s),o})),t}_selectFirstResult(e){return this.autoSelect&&e?this.select(e):Promise.resolve(null)}_suggestImmediate(e,t){return this.when().then((()=>this._getSuggestionsFromSources(e,t))).then((r=>{if(h(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e,numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}))}_formatSourceResponse(e,t,r){const s=t&&t.value||[],o=t&&t.error,i=this.allSources.at(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),q.error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===$){const s=r&&H(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach(((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)}))}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}_getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&H(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new a("search:no-sources-defined","At least one source is required.",{allSources:r});return q.error(e),Promise.reject(e)}return s===$?r.forEach(((r,s)=>{o.push(this._getResultsFromSource(e,s,t))})):o.push(this._getResultsFromSource(e,s,t)),d(o)}_getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new a("suggest:no-sources-defined","At least one source is required.",{allSources:r});return q.error(e),Promise.reject(e)}return s===$?r.forEach(((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))})):o.push(this._getSuggestionsFromSource(e,s,t)),d(o)}_getResultsFromSource(e,t,r){const s=this.allSources.at(t),{location:o=null}=e,i=this.view?.spatialReference||W,l=H(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof j&&H(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults({view:n,sourceIndex:t,location:o,suggestResult:e,spatialReference:i,exactMatch:a,maxResults:l},r)}_getSuggestionsFromSource(e,t,r){const s=this.allSources.at(t),o=H(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e.length,l=H(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||W,i=H(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof j&&H(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return Promise.resolve(null)}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return H(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){const t=this.results;let r=null;return t.some((t=>t.results.some((s=>s===e&&(r=t.sourceIndex,!0))))),r}async _goToSearchResult(e){const t=!!e;this._abortGoTo();const r=new AbortController;this._gotoController=r;const s={target:{target:e},options:{animate:t,signal:r.signal}};await this.callGoTo(s),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(g(r))return null;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this._handles.remove(z)}async _getLayerView(e){const{view:t}=this;if(!e||!t||"building-component"===e.layer.type||"subtype-sublayer"===e.layer.type)return null;const{layer:r}=e;return await t.when(),t.whenLayerView(r)}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o}=t,{objectIdField:i}=o,l=s&&s[i],a=r.highlight(l||t);this._handles.add(a,z)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t.emit("select-result-floor",e)}}};ee.ALL_INDEX=$,e([_()],ee.prototype,"_searching",void 0),e([_()],ee.prototype,"_updatingPromise",void 0),e([_({readOnly:!0,value:null})],ee.prototype,"activeSource",null),e([_()],ee.prototype,"activeSourceIndex",null),e([_()],ee.prototype,"allPlaceholder",null),e([_({readOnly:!0})],ee.prototype,"allSources",null),e([_()],ee.prototype,"autoNavigate",void 0),e([_()],ee.prototype,"autoSelect",void 0),e([_()],ee.prototype,"defaultPopupTemplate",void 0),e([_({readOnly:!0})],ee.prototype,"defaultSources",void 0),e([_()],ee.prototype,"defaultSymbols",void 0),e([_()],ee.prototype,"includeDefaultSources",void 0),e([_()],ee.prototype,"locationEnabled",null),e([_()],ee.prototype,"maxInputLength",void 0),e([_()],ee.prototype,"maxResults",void 0),e([_()],ee.prototype,"maxSuggestions",void 0),e([_()],ee.prototype,"messages",void 0),e([_()],ee.prototype,"minSuggestCharacters",void 0),e([_({readOnly:!0})],ee.prototype,"placeholder",null),e([_()],ee.prototype,"popupEnabled",void 0),e([_({type:o})],ee.prototype,"popupTemplate",void 0),e([_({type:L})],ee.prototype,"portal",void 0),e([_()],ee.prototype,"resultCount",void 0),e([_()],ee.prototype,"resultGraphicEnabled",void 0),e([_({readOnly:!0})],ee.prototype,"resultGraphic",void 0),e([_({readOnly:!0})],ee.prototype,"results",void 0),e([_({readOnly:!0})],ee.prototype,"selectedSuggestion",void 0),e([_()],ee.prototype,"searchAllEnabled",void 0),e([_({readOnly:!0})],ee.prototype,"selectedResult",void 0),e([_()],ee.prototype,"searchTerm",null),e([_({type:K})],ee.prototype,"sources",void 0),e([_({readOnly:!0})],ee.prototype,"state",null),e([_()],ee.prototype,"suggestionDelay",void 0),e([_()],ee.prototype,"suggestionCount",void 0),e([_({readOnly:!0})],ee.prototype,"suggestions",void 0),e([_()],ee.prototype,"suggestionsEnabled",void 0),e([_({readOnly:!0})],ee.prototype,"updating",null),e([_()],ee.prototype,"view",void 0),e([_()],ee.prototype,"clear",null),ee=e([v(Z)],ee);const te=ee;export{te as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9932],{10699:(e,t,r)=>{r.d(t,{IG:()=>s});var i=r(43697),o=r(52011);let n=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),this.uid=null,Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,o.j)("esri.core.Identifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,o.j)("esri.core.Identifiable")],a)},16453:(e,t,r)=>{r.d(t,{R:()=>w,w:()=>b});var i=r(43697),o=r(15923),n=r(70586),s=r(41103),a=r(22974),l=r(31263);class c{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new c,r=this._originStores[l.s3.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.d9)(e),l.s3.DEFAULTS)}));for(let r=l.s3.SERVICE;r<l.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,o)=>{e&&e.has(o)||t.set(o,(0,a.d9)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=l.s3.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||(0,n.j0)(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=l.s3.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),o=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),o!==i}originOf(e){return this._propertyOriginMap.get(e)||l.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var d=r(50549),h=r(1153),u=r(52011);const p=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,n.j0)((0,h.vw)(this)),r=t.store,i=new c;t.store=i,(0,s.M)(t,r,i)}read(e,t){(0,d.i)(this,e,t)}getAtOrigin(e,t){const r=y(this),i=(0,l.M9)(t);if("string"==typeof e)return r.get(e,i);const o={};return e.forEach((e=>{o[e]=r.get(e,i)})),o}originOf(e){return(0,l.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const r=y(this),i=(0,l.M9)(t),o=(0,h.vw)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{o.invalidate(e),r.revert(e,i),o.commit(e)}))}};return t=(0,i._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,h.vw)(e).store}let m=class extends(p(o.Z)){};m=(0,i._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],m);var g=r(76169);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,l.M9)(t))}write(e={},t){return(0,g.c)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,h.vw)(this).setAtOrigin(e,t,(0,l.M9)(r))}removeOrigin(e){const t=v(this),r=(0,l.M9)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),l.s3.USER)}updateOrigin(e,t){const r=v(this),i=(0,l.M9)(t),o=this.get(e);for(let t=i+1;t<l.kk;++t)r.delete(e,t);r.set(e,o,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,u.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,h.vw)(e).store}const w=e=>{let t=class extends(f(p(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(w(o.Z)){};b=(0,i._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],b)},78346:(e,t,r)=>{r.d(t,{bA:()=>U});var i=r(20102),o=r(80442),n=r(95330),s=r(80903),a=r(25045),l=r(40330),c=r(92604),d=r(70586),h=r(94362),u=r(99880),p=r(68773),y=(r(2587),r(17452));const m={};function g(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=m.baseUrl),m.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages??[],e)})),t}var f=r(41213);class v{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new v,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,f.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,f.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let i=await a.default.loadWorker(e);i||(i=await import(e));const o=a.default.connect(i);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:o})}}}var b=r(70171),S=r(17202);const _=c.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:k}=h.Cs;let L,I;const E="Failed to create Worker. Fallback to execute module in main thread";async function C(e){return new Promise((t=>{function r(o){const n=(0,h.QM)(o);n&&n.type===k&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),_.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let M=0;const{ABORT:O,INVOKE:T,OPEN:x,OPENED:j,RESPONSE:D}=h.Cs;class A{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}static async create(e){const t=await async function(){if(!(0,o.Z)("esri-workers")||((0,o.Z)("mozilla"),0))return C(new w);if(!L&&!I)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`Version mismatch detected between ArcGIS API for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModule version: ${t}\nAssets version: ${s}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const i=outgoing.get(r);outgoing.delete(r),o.error?i.reject(JSON.parse(o.error)):i.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=p.Z.default){const t={...p.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(p.Z));e.assetsPath=(0,y.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,o.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,o.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,o.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,o.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,o.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,o.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,o.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,o.Z)("esri-atomics"),"esri-shared-array-buffer":(0,o.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,o.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,o.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,o.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,y.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,y.hF)(e.workers.workerPath):e.workers.workerPath=(0,y.hF)((0,u.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=p.Z.workers.loaderConfig,r=g({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={version:l.i8,buildDate:S.r,revision:S.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);L=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){I=e||{}}let e;if(L)try{e=new Worker(L,{name:"esri-worker-"+M++})}catch(t){_.warn(E,I),e=new w}else _.warn(E,I),e=new w;return C(e)}();return new A(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.jt)();return new Promise(((t,o)=>{const s={resolve:t,reject:o,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:O,jobId:i})}))};this._outJobs.set(i,s),this._post({type:x,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case j:this._onOpenedMessage(t);break;case D:this._onResponseMessage(t);break;case O:this._onAbortMessage(t);break;case T:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:o}=e,s=o?new AbortController:null,a=this._inJobs,c=l.Nv[t];let d;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);d=c.call(null,i,{signal:s?s.signal:null})}catch(e){return void this._post({type:D,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(d)?(a.set(r,{controller:s,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:D,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:D,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:D,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,d.hw)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:o}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),r?n.reject(i.Z.fromJSON(JSON.parse(r))):n.resolve(o))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let N=(0,o.Z)("esri-workers-debug")?1:(0,o.Z)("host-browser")?navigator.hardwareConcurrency-1:0;N||(N=(0,o.Z)("safari")&&(0,o.Z)("mac")||(0,o.Z)("trident")?7:2);let R=0;const Z=[];async function P(e,t){const r=new s.Z;return await r.open(e,t),r}async function U(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,o.Z)("host-webworker")&&!(0,o.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const i=t.client||r;return P([a.default.connect(r)],{...t,client:i})}if(await async function(){if(H)return H;G=new AbortController;const e=[];for(let t=0;t<N;t++){const r=A.create(t).then((e=>(Z[t]=e,e)));e.push(r)}return H=Promise.all(e),H}(),(0,n.k_)(t.signal),"dedicated"===r){const r=R++%N;return P([await Z[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,N);if(r<N){const i=new Array(r);for(let o=0;o<r;++o){const r=R++%N;i[o]=Z[r].open(e,t)}return P(i,t)}}return P(Z.map((r=>r.open(e,t))),t)}let G,H=null},79235:(e,t,r)=>{r.d(t,{Z:()=>w});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),c=r(20941),d=r(5600),h=(r(80442),r(75215),r(71715)),u=r(52011),p=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new c.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new c.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,d.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,o._)([(0,p.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,o._)([(0,h.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,o._)([(0,d.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,o._)([(0,h.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,o._)([(0,h.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,o._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,o._)([(0,h.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,o._)([(0,u.j)("esri.geometry.HeightModelInfo")],f);const w=f},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var i=r(94443),o=r(3172),n=r(20102),s=r(70586);async function a(e){if((0,s.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,o.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,o){const s=t.exec(r);if(!s)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=s[1]?`${s[1]}/`:"",c=s[2],d=(0,i.Su)(o),h=`${l}${c}.json`,u=d?`${l}${c}_${d}.json`:h;let p;try{p=await a(e(u))}catch(t){if(u===h)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await a(e(h))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const c={};var d,h=r(99880);(0,i.tz)((d={pattern:"esri/",location:h.V},new l(d)))},90344:(e,t,r)=>{r.d(t,{Ze:()=>g,p6:()=>f});var i=r(35454),o=r(70171);const n={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},a={year:"numeric",month:"short",day:"numeric"},l={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},d={...c,second:"numeric"},h={"short-date":n,"short-date-short-time":{...n,...c},"short-date-short-time-24":{...n,...c,hour12:!1},"short-date-long-time":{...n,...d},"short-date-long-time-24":{...n,...d,hour12:!1},"short-date-le":n,"short-date-le-short-time":{...n,...c},"short-date-le-short-time-24":{...n,...c,hour12:!1},"short-date-le-long-time":{...n,...d},"short-date-le-long-time-24":{...n,...d,hour12:!1},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...c},"long-month-day-year-short-time-24":{...s,...c,hour12:!1},"long-month-day-year-long-time":{...s,...d},"long-month-day-year-long-time-24":{...s,...d,hour12:!1},"day-short-month-year":a,"day-short-month-year-short-time":{...a,...c},"day-short-month-year-short-time-24":{...a,...c,hour12:!1},"day-short-month-year-long-time":{...a,...d},"day-short-month-year-long-time-24":{...a,...d,hour12:!1},"long-date":l,"long-date-short-time":{...l,...c},"long-date-short-time-24":{...l,...c,hour12:!1},"long-date-long-time":{...l,...d},"long-date-long-time-24":{...l,...d,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":d},u=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p=(u.apiValues,u.toJSON.bind(u),u.fromJSON.bind(u),{ar:"ar-u-nu-latn-ca-gregory"});let y=new WeakMap,m=h["short-date-short-time"];function g(e){return e?h[e]:null}function f(e,t){return function(e){const t=e||m;let r=y.get(t);if(!r){const e=(0,o.Kd)(),i=p[(0,o.Kd)()]||e;r=new Intl.DateTimeFormat(i,t),y.set(t,r)}return r}(t).format(e)}(0,o.Ze)((()=>{y=new WeakMap,m=h["short-date-short-time"]}))},18848:(e,t,r)=>{r.d(t,{sh:()=>l,uf:()=>c});var i=r(70586),o=r(70171);const n={ar:"ar-u-nu-latn"};let s=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function c(e,t){return-0===e&&(e=0),function(e){const t=e||a;if(!s.has(t)){const r=(0,o.Kd)(),i=n[(0,o.Kd)()]||r;s.set(t,new Intl.NumberFormat(i,e))}return(0,i.j0)(s.get(t))}(t).format(e)}(0,o.Ze)((()=>{s=new WeakMap,a={}}))},940:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(92604),o=r(78286),n=r(19153),s=r(90344),a=r(18848);const l=i.Z.getLogger("esri.intl.substitute");function c(e,t,r={}){const{format:i={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let i,n;const s=e.indexOf(":");if(-1===s?i=e.trim():(i=e.slice(0,s).trim(),n=e.slice(s+1).trim()),!i)return"";const a=(0,o.hS)(i,t);if(null==a)return"";const l=(n?r?.[n]:null)??r?.[i];return l?d(a,l):n?h(a,n):u(a)}(e,t,i)))}function d(e,t){switch(t.type){case"date":return(0,s.p6)(e,t.intlOptions);case"number":return(0,a.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),u(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return(0,s.p6)(e);case"numberformat":return(0,a.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,s.p6)(e):/^numberformat/i.test(t)?(0,a.uf)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,s.p6)(e):""}}},49932:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var i=r(43697),o=r(3172),n=r(20102),s=r(70586),a=r(16453),l=r(95330),c=r(17452),d=r(5600),h=r(67676),u=(r(80442),r(75215),r(71715)),p=r(52011),y=r(79235),m=r(87085),g=r(46486),f=r(17287),v=r(38009),w=r(16859),b=r(21506),S=r(50758),_=r(92604),k=r(78346);class L extends class{constructor(e,t,r,i,o={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,k.bA)(e,{...o,schedule:i}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,o.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>_.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,S.kB)((()=>{r.removed=!0,(0,h.Od)(this._listeners,r),this._thread&&(0,s.pC)(r.threadHandle)&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this._transferLists[e],o=i?i(t):[];return this._thread.invoke(e,t,{transferList:o,signal:r})}return this._promise?this._promise.then((()=>((0,l.k_)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(I.forEach(((e,t)=>{e===this&&I.delete(t)})),this.destroy())}}const I=new Map;let E=class extends((0,g.Z)((0,f.Y)((0,v.q)((0,w.I)((0,a.R)(m.Z)))))){constructor(...e){super(...e),this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=I.get((0,s.Wg)(e));return t||((0,s.pC)(e)?(t=new L((t=>e.schedule(t))),I.set(e,t)):(t=new L,I.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,s.RY)(this._lercDecoder)}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=(0,s.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,i){const n=(0,s.pC)((i=i||{signal:null}).signal)?i.signal:i.signal=(new AbortController).signal,a={responseType:"array-buffer",signal:n},l={noDataValue:i.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,i))).then((()=>(0,o.default)(this.getTileUrl(e,t,r),a))).then((e=>this._lercDecoder.decode(e.data,l,n))).then((e=>({values:e.pixelData,width:e.width,height:e.height,maxZError:e.fileInfo.maxZError,noDataValue:e.noDataValue,minValue:e.minValue,maxValue:e.maxValue})))}getTileUrl(e,t,r){const i=!this.tilemapCache&&this.supportsBlankTile,o=(0,c.B7)({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${o?"?"+o:""}`}async queryElevation(e,t){const{ElevationQuery:i}=await Promise.all([r.e(4547),r.e(5642)]).then(r.bind(r,55642));return(0,l.k_)(t),(new i).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:i}=await Promise.all([r.e(4547),r.e(5642)]).then(r.bind(r,55642));return(0,l.k_)(t),(new i).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,o.default)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile.__isDefault__}};(0,i._)([(0,d.Cb)({json:{read:{source:"copyrightText"}}})],E.prototype,"copyright",void 0),(0,i._)([(0,d.Cb)({readOnly:!0,type:y.Z})],E.prototype,"heightModelInfo",void 0),(0,i._)([(0,d.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],E.prototype,"path",void 0),(0,i._)([(0,d.Cb)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"minScale",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"maxScale",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],E.prototype,"opacity",void 0),(0,i._)([(0,d.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],E.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.Cb)()],E.prototype,"sourceJSON",void 0),(0,i._)([(0,d.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],E.prototype,"type",void 0),(0,i._)([(0,d.Cb)(b.HQ)],E.prototype,"url",void 0),(0,i._)([(0,d.Cb)()],E.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["currentVersion"])],E.prototype,"readVersion",null),E=(0,i._)([(0,p.j)("esri.layers.ElevationLayer")],E),E.prototype.fetchTile.__isDefault__=!0;const C=E},87085:(e,t,r)=>{r.d(t,{Z:()=>w});var i=r(43697),o=(r(66577),r(3172)),n=r(20102),s=r(32448),a=r(10699),l=r(83379),c=r(92604),d=r(95330),h=r(17452),u=r(5600),p=(r(67676),r(80442),r(75215),r(52011)),y=r(68773),m=r(6570),g=r(82971);let f=0,v=class extends(s.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,g.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},i=await Promise.all([r.e(4547),r.e(8008)]).then(r.bind(r,28008));try{return await i.fromItem(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",o=r&&r.portal&&r.portal.url||y.Z.portalUrl;throw c.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||c.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,h.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,u.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,u.Cb)({type:m.Z})],v.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,u.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],v.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,u.Cb)()],v.prototype,"url",void 0),(0,i._)([(0,u.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,p.j)("esri.layers.Layer")],v);const w=v},46486:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),o=(r(66577),r(5600)),n=(r(67676),r(80442),r(75215),r(71715)),s=r(52011),a=r(45322),l=r(56608),c=r(82971);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t){return t.capabilities&&t.capabilities.includes("Tilemap")?new l.y({layer:this}):null}};return(0,i._)([(0,o.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,o.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,o.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,o.Cb)({type:c.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,i._)([(0,o.Cb)(a.h)],t.prototype,"tileInfo",void 0),(0,i._)([(0,o.Cb)()],t.prototype,"tilemapCache",void 0),(0,i._)([(0,n.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,i._)([(0,o.Cb)()],t.prototype,"version",void 0),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>c});var i=r(43697),o=r(92604),n=r(70586),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(66677);const c=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,s.Cb)()],t.prototype,"title",null),(0,i._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},38009:(e,t,r)=>{r.d(t,{q:()=>p});var i=r(43697),o=r(20102),n=r(17452),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011)),l=r(30556),c=r(50549),d=r(76169);const h={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0,LineOfSightLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":{ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,OGCFeatureLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-map/basemap":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},"web-map/tables":{ArcGISFeatureLayer:!0},"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0}};var u=r(21506);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,d.d)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){!e||i&&"tables"===i.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e||"Layer"}read(e,t){t&&(t.layer=this),(0,c.$)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=h[e];let i=r&&r[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new o.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof o.Z&&"web-document-write:property-required"===e.name)).length;return(0,n.jc)(r?.url)?(t?.messages?.push(new o.Z("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,s.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,s.Cb)(u.rT)],t.prototype,"listMode",void 0),(0,i._)([(0,l.c)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,s.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,s.Cb)(u.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,s.Cb)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,l.c)([void 0,"web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{name:"visibility"}})],t.prototype,"visible",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.OperationalLayer")],t),t}},21506:(e,t,r)=>{r.d(t,{qG:()=>b,PV:()=>g,id:()=>_,iR:()=>p,rn:()=>m,rT:()=>I,u1:()=>L,rO:()=>k,Oh:()=>v,bT:()=>w,C_:()=>u,Lx:()=>f,vg:()=>S,YI:()=>h,HQ:()=>y});var i=r(92835),o=r(6570),n=r(82971),s=r(25929),a=r(70586),l=(r(95330),r(35463)),c=r(86787),d=r(65242);const h={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},u={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},p={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},m={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},g={value:null,type:c.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function f(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={type:Number,json:{origins:{"web-document":{write:!0,read:!0},"portal-item":{write:!0}}}},w={...v,json:{...v.json,origins:{"web-document":{...v.json.origins["web-document"],write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,d.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,d.b)(t.drawingInfo.transparency)}}},b={type:i.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:r}=this.layer,o=this.view?.timeExtent;let n=this.layer.timeExtent;e&&(n=function(e){if(!e)return e;const{start:t,end:r}=e;return new i.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,r.getTimezoneOffset(),"minutes"):r})}(n));let s=r?o&&n?o.intersection(n):o||n:n;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=function(e){if(!e)return e;const{start:t,end:r}=e;return new i.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,-r.getTimezoneOffset(),"minutes"):r})}(s));const c=this._get("timeExtent");return s.equals(c)?c:s}},S={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=o.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=n.Z.fromJSON(t.spatialReference)),r}}}},read:!1}},_={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},k={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},L={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}},I={json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}}},99282:(e,t,r)=>{r.d(t,{a:()=>n});var i=r(67900),o=r(68441);const n={inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",o.sv.radius)}},86787:(e,t,r)=>{r.d(t,{Z:()=>b});var i,o=r(43697),n=r(35454),s=r(96674),a=r(70586),l=r(5600),c=(r(67676),r(80442),r(75215),r(71715)),d=r(52011),h=r(30556),u=r(35671);let p=i=class extends s.wq{async collectRequiredFields(e,t){return(0,u.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,o._)([(0,d.j)("esri.layers.support.FeatureExpressionInfo")],p);const y=p;var m,g=r(12541);const f=(0,n.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),v=new n.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let w=m=class extends s.wq{constructor(){super(...arguments),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,i){t[r]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):(0,a.pC)(e)||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,o._)([(0,l.Cb)({type:y,json:{write:!0}})],w.prototype,"featureExpressionInfo",void 0),(0,o._)([(0,c.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],w.prototype,"readFeatureExpressionInfo",null),(0,o._)([(0,h.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],w.prototype,"writeFeatureExpressionInfo",null),(0,o._)([(0,l.Cb)({type:f.apiValues,nonNullable:!0,json:{type:f.jsonValues,read:f.read,write:{writer:f.write,isRequired:!0}}})],w.prototype,"mode",null),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"offset",void 0),(0,o._)([(0,l.Cb)({type:g.f9,json:{type:String,read:v.read,write:v.write}})],w.prototype,"unit",null),w=m=(0,o._)([(0,d.j)("esri.layers.support.ElevationInfo")],w);const b=w},12541:(e,t,r)=>{r.d(t,{f9:()=>o});var i=r(99282);const o=function(){const e=Object.keys(i.a);return e.sort(),e}()},65242:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>n});var i=r(75215);function o(e){const t=(0,i.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9454],{6352:(t,e,o)=>{o.d(e,{a:()=>c});var r,s=o(43697),i=o(22303),l=o(96674),n=o(22974),a=o(5600),p=(o(75215),o(52011)),y=o(37308);let h=r=class extends l.wq{constructor(){super(...arguments),this.color=new i.Z("white")}clone(){return new r({color:(0,n.d9)(this.color)})}};(0,s._)([(0,a.Cb)(y.a)],h.prototype,"color",void 0),h=r=(0,s._)([(0,p.j)("esri.symbols.callouts.LineCallout3DBorder")],h);const c=h;Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,o)=>{o.d(e,{J:()=>y,j:()=>h});var r=o(43697),s=o(15923),i=(o(80442),o(22974)),l=(o(92604),o(70586)),n=o(31263),a=o(1153),p=o(52011);const y=t=>{let e=class extends t{clone(){const t=(0,l.s3)((0,a.vw)(this),"unable to clone instance of non-accessor class"),e=t.metadatas,o=t.store,r={},s=new Map;for(const t in e){const l=e[t],a=o?.originOf(t),p=l.clonable;if(l.readOnly||!1===p||a!==n.s3.USER&&a!==n.s3.DEFAULTS&&a!==n.s3.WEB_MAP&&a!==n.s3.WEB_SCENE)continue;const y=this[t];let h=null;h="function"==typeof p?p(y):"reference"===p?y:(0,i.Vo)(y),null!=y&&null==h||(a===n.s3.DEFAULTS?s.set(t,h):r[t]=h)}const p=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const t=(0,a.vw)(p)?.store;if(t)for(const[e,o]of s)t.set(e,o,n.s3.DEFAULTS)}return p}};return e=(0,r._)([(0,p.j)("esri.core.Clonable")],e),e};let h=class extends(y(s.Z)){};h=(0,r._)([(0,p.j)("esri.core.Clonable")],h)},10699:(t,e,o)=>{o.d(e,{IG:()=>l});var r=o(43697),s=o(52011);let i=0;const l=t=>{let e=class extends t{constructor(...t){super(...t),this.uid=null,Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return e=(0,r._)([(0,s.j)("esri.core.Identifiable")],e),e};let n=class extends(l(class{})){};n=(0,r._)([(0,s.j)("esri.core.Identifiable")],n)},16453:(t,e,o)=>{o.d(e,{R:()=>v,w:()=>f});var r=o(43697),s=o(15923),i=o(70586),l=o(41103),n=o(22974),a=o(31263);class p{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new p,o=this._originStores[a.s3.DEFAULTS];o&&o.forEach(((t,o)=>{e.set(o,(0,n.d9)(t),a.s3.DEFAULTS)}));for(let o=a.s3.SERVICE;o<a.kk;o++){const r=this._originStores[o];r&&r.forEach(((r,s)=>{t&&t.has(s)||e.set(s,(0,n.d9)(r),o)}))}return e}get(t,e){const o=void 0===e?this._values:this._originStores[e];return o?o.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,o=a.s3.USER){let r=this._originStores[o];if(r||(r=new Map,this._originStores[o]=r),r.set(t,e),!this._values.has(t)||(0,i.j0)(this._propertyOriginMap.get(t))<=o){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,o),r!==e}return!1}delete(t,e=a.s3.USER){const o=this._originStores[e];if(!o)return;const r=o.get(t);if(o.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let o=e-1;o>=0;o--){const e=this._originStores[o];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,o);break}}}return r}has(t,e){const o=void 0===e?this._values:this._originStores[e];return!!o&&o.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const o=this._originStores[e],r=o&&o.get(t),s=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),s!==r}originOf(t){return this._propertyOriginMap.get(t)||a.s3.DEFAULTS}forEach(t){this._values.forEach(t)}}var y=o(50549),h=o(1153),c=o(52011);const d=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,i.j0)((0,h.vw)(this)),o=e.store,r=new p;e.store=r,(0,l.M)(e,o,r)}read(t,e){(0,y.i)(this,t,e)}getAtOrigin(t,e){const o=u(this),r=(0,a.M9)(e);if("string"==typeof t)return o.get(t,r);const s={};return t.forEach((t=>{s[t]=o.get(t,r)})),s}originOf(t){return(0,a.x3)(this.originIdOf(t))}originIdOf(t){return u(this).originOf(t)}revert(t,e){const o=u(this),r=(0,a.M9)(e),s=(0,h.vw)(this);let i;i="string"==typeof t?"*"===t?o.keys(r):[t]:t,i.forEach((t=>{s.invalidate(t),o.revert(t,r),s.commit(t)}))}};return e=(0,r._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function u(t){return(0,h.vw)(t).store}let b=class extends(d(s.Z)){};b=(0,r._)([(0,c.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],b);var m=o(76169);const w=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){return g(this).delete(t,(0,a.M9)(e))}write(t={},e){return(0,m.c)(this,t=t||{},e),t}setAtOrigin(t,e,o){(0,h.vw)(this).setAtOrigin(t,e,(0,a.M9)(o))}removeOrigin(t){const e=g(this),o=(0,a.M9)(t),r=e.keys(o);for(const t of r)e.originOf(t)===o&&e.set(t,e.get(t,o),a.s3.USER)}updateOrigin(t,e){const o=g(this),r=(0,a.M9)(e),s=this.get(t);for(let e=r+1;e<a.kk;++e)o.delete(t,e);o.set(t,s,r)}toJSON(t){return this.write({},t)}};return e=(0,r._)([(0,c.j)("esri.core.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function g(t){return(0,h.vw)(t).store}const v=t=>{let e=class extends(w(d(t))){constructor(...t){super(...t)}};return e=(0,r._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],e),e};let f=class extends(v(s.Z)){};f=(0,r._)([(0,c.j)("esri.core.MultiOriginJSONSupport")],f)},70921:(t,e,o)=>{o.d(e,{R:()=>i,Z:()=>s});var r=o(46791);function s(t,e,o=r.Z){return e||(e=new o),e===t||(e.removeAll(),(s=t)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?e.addMany(t):t&&e.add(t)),e;var s}function i(t){return t}},87085:(t,e,o)=>{o.d(e,{Z:()=>v});var r=o(43697),s=(o(66577),o(3172)),i=o(20102),l=o(32448),n=o(10699),a=o(83379),p=o(92604),y=o(95330),h=o(17452),c=o(5600),d=(o(67676),o(80442),o(75215),o(52011)),u=o(68773),b=o(6570),m=o(82971);let w=0,g=class extends(l.Z.EventedMixin((0,n.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new b.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+w++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await o.e(3529).then(o.bind(o,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},r=await Promise.all([o.e(4547),o.e(8008)]).then(o.bind(o,28008));try{return await r.fromItem(e)}catch(t){const o=e&&e.portalItem,r=o&&o.id||"unset",s=o&&o.portal&&o.portal.url||u.Z.portalUrl;throw p.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,y.D_)(t)||p.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){if(this.parent){const t=this,e=this.parent;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"baseLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const t=this.url;return t?(0,h.mN)(t):null}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,s.default)(t,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.Cb)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.Cb)({type:b.Z})],g.prototype,"fullExtent",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,r._)([(0,c.Cb)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,r._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,r._)([(0,c.Cb)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,r._)([(0,c.Cb)({clonable:!1})],g.prototype,"parent",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,r._)([(0,c.Cb)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,r._)([(0,c.Cb)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,r._)([(0,c.Cb)({type:m.Z})],g.prototype,"spatialReference",void 0),(0,r._)([(0,c.Cb)({type:String})],g.prototype,"title",void 0),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,r._)([(0,c.Cb)()],g.prototype,"url",void 0),(0,r._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,r._)([(0,d.j)("esri.layers.Layer")],g);const v=g},78223:(t,e,o)=>{o.d(e,{se:()=>q,cT:()=>A,dU:()=>P,S9:()=>T,LB:()=>J,AH:()=>U,yK:()=>E,S6:()=>F,QT:()=>W,f_:()=>I});var r,s=o(75215),i=o(63213),l=o(17386),n=(o(38445),o(21218)),a=o(95191),p=(o(31134),o(50575),o(20825)),y=o(98587),h=(o(38128),o(40908),o(43697)),c=o(46791),d=o(22974),u=o(5600),b=o(36030),m=o(52011),w=o(87223);const g=c.Z.ofType({base:null,key:"type",typeMap:{fill:a.Z}});let v=r=class extends w.Z{constructor(t){super(t),this.symbolLayers=new g,this.type="mesh-3d"}clone(){return new r({styleOrigin:(0,d.d9)(this.styleOrigin),symbolLayers:(0,d.d9)(this.symbolLayers),thumbnail:(0,d.d9)(this.thumbnail)})}};(0,h._)([(0,u.Cb)({type:g})],v.prototype,"symbolLayers",void 0),(0,h._)([(0,b.J)({MeshSymbol3D:"mesh-3d"},{readOnly:!0})],v.prototype,"type",void 0),v=r=(0,h._)([(0,m.j)("esri.symbols.MeshSymbol3D")],v);const f=v;o(17143),o(96742);var _,C=o(62357),S=o(94075);let j=_=class extends n.Z{constructor(...t){super(...t),this.type="picture-fill",this.url=null,this.xscale=1,this.yscale=1,this.width=12,this.height=12,this.xoffset=0,this.yoffset=0,this.source=null}normalizeCtorArgs(t,e,o,r){if(t&&"string"!=typeof t&&null==t.imageData)return t;const s={};return t&&(s.url=t),e&&(s.outline=e),null!=o&&(s.width=(0,C.t_)(o)),null!=r&&(s.height=(0,C.t_)(r)),s}clone(){const t=new _({color:(0,d.d9)(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});return t._set("source",(0,d.d9)(this.source)),t}hash(){return`${super.hash()}.${this.color?.hash()}.${this.height}.${this.url}.${this.width}.${this.xoffset}.${this.xscale}.${this.yoffset}.${this.yscale}`}};(0,h._)([(0,b.J)({esriPFS:"picture-fill"},{readOnly:!0})],j.prototype,"type",void 0),(0,h._)([(0,u.Cb)(S.KA)],j.prototype,"url",void 0),(0,h._)([(0,u.Cb)({type:Number,json:{write:!0}})],j.prototype,"xscale",void 0),(0,h._)([(0,u.Cb)({type:Number,json:{write:!0}})],j.prototype,"yscale",void 0),(0,h._)([(0,u.Cb)({type:Number,cast:C.t_,json:{write:!0}})],j.prototype,"width",void 0),(0,h._)([(0,u.Cb)({type:Number,cast:C.t_,json:{write:!0}})],j.prototype,"height",void 0),(0,h._)([(0,u.Cb)({type:Number,cast:C.t_,json:{write:!0}})],j.prototype,"xoffset",void 0),(0,h._)([(0,u.Cb)({type:Number,cast:C.t_,json:{write:!0}})],j.prototype,"yoffset",void 0),(0,h._)([(0,u.Cb)(S.Ds)],j.prototype,"source",void 0),j=_=(0,h._)([(0,m.j)("esri.symbols.PictureFillSymbol")],j);const Z=j;var x=o(37898),L=o(42143),z=o(86114),O=o(20256),k=o(4095),D=o(77987),N=o(89164),M=(o(95868),o(78724)),$=(o(2283),o(44398),o(59390));function A(t){if(!t)return!1;switch(t.type){case"picture-fill":case"picture-marker":case"simple-fill":case"simple-line":case"simple-marker":case"text":case"cim":return!0;default:return!1}}function P(t){if(!t)return!1;switch(t.type){case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":return!0;default:return!1}}o(69496),o(6352);const J={base:N.Z,key:"type",typeMap:{"simple-fill":O.Z,"picture-fill":Z,"picture-marker":x.Z,"simple-line":k.Z,"simple-marker":D.Z,text:M.Z,"label-3d":p.Z,"line-3d":y.Z,"mesh-3d":f,"point-3d":L.Z,"polygon-3d":z.Z,"web-style":$.Z,cim:l.Z},errorContext:"symbol"},U={base:N.Z,key:"type",typeMap:{"picture-marker":x.Z,"simple-marker":D.Z,text:M.Z,"web-style":$.Z,cim:l.Z},errorContext:"symbol"},T=(0,i.d)({types:J}),W={base:N.Z,key:"type",typeMap:{"simple-fill":O.Z,"picture-fill":Z,"picture-marker":x.Z,"simple-line":k.Z,"simple-marker":D.Z,text:M.Z,"line-3d":y.Z,"mesh-3d":f,"point-3d":L.Z,"polygon-3d":z.Z,"web-style":$.Z,cim:l.Z},errorContext:"symbol"},E={base:N.Z,key:"type",typeMap:{text:M.Z,"label-3d":p.Z},errorContext:"symbol"},I=(N.Z,p.Z,y.Z,L.Z,z.Z,$.Z,{base:N.Z,key:"type",typeMap:{"line-3d":y.Z,"mesh-3d":f,"point-3d":L.Z,"polygon-3d":z.Z,"web-style":$.Z,cim:l.Z},errorContext:"symbol"}),F={base:N.Z,key:"type",typeMap:{"label-3d":p.Z},errorContext:"symbol"},q=(0,s.N7)(J)},17386:(t,e,o)=>{o.d(e,{Z:()=>b});var r,s=o(43697),i=o(22974),l=o(19153),n=o(5600),a=(o(75215),o(36030)),p=o(71715),y=o(52011),h=o(30556),c=o(35671),d=o(89164);let u=r=class extends d.Z{constructor(t){super(t),this.data=null,this.type="cim"}readData(t,e){return e}writeData(t,e){if(t)for(const o in t)e[o]=t[o]}async collectRequiredFields(t,e){if("CIMSymbolReference"===this.data.type){const o=this.data.primitiveOverrides;if(o){const r=o.map((o=>{const r=o.valueExpressionInfo;return(0,c.io)(t,e,r.expression)}));await Promise.all(r)}}}clone(){return new r({data:(0,i.d9)(this.data)})}hash(){return(0,l.hP)(JSON.stringify(this.data)).toString()}};(0,s._)([(0,n.Cb)({json:{write:!1}})],u.prototype,"color",void 0),(0,s._)([(0,n.Cb)({json:{write:!0}})],u.prototype,"data",void 0),(0,s._)([(0,p.r)("data",["symbol"])],u.prototype,"readData",null),(0,s._)([(0,h.c)("data",{})],u.prototype,"writeData",null),(0,s._)([(0,a.J)({CIMSymbolReference:"cim"},{readOnly:!0})],u.prototype,"type",void 0),u=r=(0,s._)([(0,y.j)("esri.symbols.CIMSymbol")],u);const b=u},38445:(t,e,o)=>{o.d(e,{Z:()=>d});var r,s=o(43697),i=o(70586),l=o(5600),n=(o(67676),o(80442),o(75215),o(36030)),a=o(52011),p=o(95868),y=o(56332),h=o(52879);let c=r=class extends p.Z{constructor(t){super(t),this.type="extrude",this.size=1,this.material=null,this.castShadows=!0,this.edges=null}clone(){return new r({edges:this.edges&&this.edges.clone(),enabled:this.enabled,material:(0,i.pC)(this.material)?this.material.clone():null,castShadows:this.castShadows,size:this.size})}};(0,s._)([(0,n.J)({Extrude:"extrude"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}},nonNullable:!0})],c.prototype,"size",void 0),(0,s._)([(0,l.Cb)({type:h.b,json:{write:!0}})],c.prototype,"material",void 0),(0,s._)([(0,l.Cb)({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],c.prototype,"castShadows",void 0),(0,s._)([(0,l.Cb)(y.Z)],c.prototype,"edges",void 0),c=r=(0,s._)([(0,a.j)("esri.symbols.ExtrudeSymbol3DLayer")],c);const d=c},21218:(t,e,o)=>{o.d(e,{Z:()=>p});var r=o(43697),s=o(5600),i=(o(67676),o(80442),o(75215),o(52011)),l=o(4095),n=o(89164);let a=class extends n.Z{constructor(t){super(t),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline&&this.outline.hash()}`}};(0,r._)([(0,s.Cb)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":l.Z}},json:{default:null,write:!0}})],a.prototype,"outline",void 0),(0,r._)([(0,s.Cb)({type:["simple-fill","picture-fill"],readOnly:!0})],a.prototype,"type",void 0),a=(0,r._)([(0,i.j)("esri.symbols.FillSymbol")],a);const p=a},95191:(t,e,o)=>{o.d(e,{Z:()=>x});var r,s=o(43697),i=o(70586),l=o(5600),n=(o(67676),o(80442),o(75215),o(36030)),a=o(52011),p=o(95868),y=o(56332),h=o(4618),c=o(74721),d=o(17495),u=o(50178),b=(o(92604),o(20102),o(52879));let m=r=class extends b.b{constructor(t){super(t),this.colorMixMode=null}clone(){const t={color:(0,i.pC)(this.color)?this.color.clone():null,colorMixMode:this.colorMixMode};return new r(t)}};(0,s._)([(0,n.J)({multiply:"multiply",replace:"replace",tint:"tint"})],m.prototype,"colorMixMode",void 0),m=r=(0,s._)([(0,a.j)("esri.symbols.support.Symbol3DFillMaterial")],m);var w,g=o(22303),v=o(96674),f=o(62357),_=o(37308),C=o(45119);let S=w=class extends v.wq{constructor(t){super(t),this.color=new g.Z([0,0,0,1]),this.size=(0,f.Wz)(1),this.pattern=null,this.patternCap="butt"}clone(){const t={color:(0,i.pC)(this.color)?this.color.clone():null,size:this.size,pattern:(0,i.pC)(this.pattern)?this.pattern.clone():null,patternCap:this.patternCap};return new w(t)}};var j;(0,s._)([(0,l.Cb)(_.a)],S.prototype,"color",void 0),(0,s._)([(0,l.Cb)(_.y)],S.prototype,"size",void 0),(0,s._)([(0,l.Cb)(d.D)],S.prototype,"pattern",void 0),(0,s._)([(0,l.Cb)({type:C.Hc,json:{default:"butt",write:{overridePolicy(){return{enabled:(0,i.pC)(this.pattern)}}}}})],S.prototype,"patternCap",void 0),S=w=(0,s._)([(0,a.j)("esri.symbols.support.Symbol3DOutline")],S);let Z=j=class extends p.Z{constructor(t){super(t),this.type="fill",this.material=null,this.pattern=null,this.castShadows=!0,this.outline=null,this.edges=null}clone(){const t={edges:(0,i.pC)(this.edges)?this.edges.clone():null,enabled:this.enabled,material:(0,i.pC)(this.material)?this.material.clone():null,pattern:(0,i.pC)(this.pattern)?this.pattern.clone():null,castShadows:this.castShadows,outline:(0,i.pC)(this.outline)?this.outline.clone():null};return new j(t)}static fromSimpleFillSymbol(t){const e=t.outline&&t.outline.style&&"inside-frame"!==t.outline.style&&"solid"!==t.outline.style?new h.Z({style:t.outline.style}):null,o={size:t.outline?.width??0,color:(t.outline?.color??u.ix).clone(),pattern:e};return e&&t.outline?.cap&&(o.patternCap=t.outline.cap),new j({material:new m({color:(t.color??u.l9).clone()}),pattern:t.style&&"solid"!==t.style?new c.Z({style:t.style}):null,outline:o})}};(0,s._)([(0,n.J)({Fill:"fill"},{readOnly:!0})],Z.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:m,json:{write:!0}})],Z.prototype,"material",void 0),(0,s._)([(0,l.Cb)(d.q)],Z.prototype,"pattern",void 0),(0,s._)([(0,l.Cb)({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],Z.prototype,"castShadows",void 0),(0,s._)([(0,l.Cb)({type:S,json:{write:!0}})],Z.prototype,"outline",void 0),(0,s._)([(0,l.Cb)(y.Z)],Z.prototype,"edges",void 0),Z=j=(0,s._)([(0,a.j)("esri.symbols.FillSymbol3DLayer")],Z);const x=Z},31134:(t,e,o)=>{o.d(e,{Z:()=>c});var r,s=o(43697),i=o(96674),l=o(62357),n=o(5600),a=(o(67676),o(80442),o(90578)),p=o(52011),y=o(61565);let h=r=class extends i.wq{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return(0,l.t_)(t)}clone(){return new r({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,s._)([(0,n.Cb)({type:y.JT,json:{default:"none",write:!0}})],h.prototype,"decoration",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],h.prototype,"family",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:{overridePolicy:(t,e,o)=>({enabled:!o||!o.textSymbol3D})}}})],h.prototype,"size",void 0),(0,s._)([(0,a.p)("size")],h.prototype,"castSize",null),(0,s._)([(0,n.Cb)({type:y.g6,json:{default:"normal",write:!0}})],h.prototype,"style",void 0),(0,s._)([(0,n.Cb)({type:y.vC,json:{default:"normal",write:!0}})],h.prototype,"weight",void 0),h=r=(0,s._)([(0,p.j)("esri.symbols.Font")],h);const c=h},50575:(t,e,o)=>{o.d(e,{Z:()=>P});var r,s=o(43697),i=o(92604),l=o(70586),n=o(17452),a=o(5600),p=(o(67676),o(80442),o(75215),o(36030)),y=o(52011),h=o(95868),c=o(50178),d=o(35454),u=o(96674),b=o(71715),m=o(30556),w=o(25929);const g=(0,d.w)()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"});let v=r=class extends u.wq{constructor(t){super(t)}readHref(t,e,o){return t?(0,w.f)(t,o):e.dataURI}writeHref(t,e,o,r){t&&((0,n.HK)(t)?e.dataURI=t:(e.href=(0,w.t)(t,r),(0,n.YP)(e.href)&&(e.href=(0,n.Fv)(e.href))))}clone(){return new r({href:this.href,primitive:this.primitive})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],v.prototype,"href",void 0),(0,s._)([(0,b.r)("href")],v.prototype,"readHref",null),(0,s._)([(0,m.c)("href",{href:{type:String},dataURI:{type:String}})],v.prototype,"writeHref",null),(0,s._)([(0,p.J)(g)],v.prototype,"primitive",void 0),v=r=(0,s._)([(0,y.j)("esri.symbols.support.IconSymbol3DLayerResource")],v);var f,_=o(37308),C=o(15923);let S=f=class extends C.Z{constructor(){super(...arguments),this.x=0,this.y=0}clone(){return new f({x:this.x,y:this.y})}};(0,s._)([(0,a.Cb)({type:Number})],S.prototype,"x",void 0),(0,s._)([(0,a.Cb)({type:Number})],S.prototype,"y",void 0),S=f=(0,s._)([(0,y.j)("esri.symbols.support.Symbol3DAnchorPosition2D")],S);var j,Z=o(22303),x=o(62357);let L=j=class extends u.wq{constructor(t){super(t),this.color=new Z.Z([0,0,0,1]),this.size=(0,x.Wz)(1)}clone(){const t={color:(0,l.pC)(this.color)?this.color.clone():null,size:this.size};return new j(t)}};(0,s._)([(0,a.Cb)(_.a)],L.prototype,"color",void 0),(0,s._)([(0,a.Cb)(_.y)],L.prototype,"size",void 0),L=j=(0,s._)([(0,y.j)("esri.symbols.support.Symbol3DIconOutline")],L);var z,O=o(52879);const k="esri.symbols.IconSymbol3DLayer";let D=z=class extends h.Z{constructor(t){super(t),this.material=null,this.resource=null,this.type="icon",this.size=12,this.anchor="center",this.anchorPosition=null,this.outline=null}clone(){return new z({anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),enabled:this.enabled,material:(0,l.pC)(this.material)?this.material.clone():null,outline:(0,l.pC)(this.outline)?this.outline.clone():null,resource:this.resource&&this.resource.clone(),size:this.size})}static fromSimpleMarkerSymbol(t){const e=t.color||c.ix,o=N(t),r=t.outline&&t.outline.width>0?{size:t.outline.width,color:(t.outline.color||c.ix).clone()}:null;return new z({size:t.size,resource:{primitive:A(t.style)},material:{color:e},outline:r,anchor:o?"relative":void 0,anchorPosition:o})}static fromPictureMarkerSymbol(t){const e=!t.color||(0,c.rx)(t.color)?c.ix:t.color,o=N(t);return new z({size:t.width<=t.height?t.height:t.width,resource:{href:t.url},material:{color:e.clone()},anchor:o?"relative":void 0,anchorPosition:o})}static fromCIMSymbol(t){return new z({resource:{href:(0,n._l)({mediaType:"application/json",data:JSON.stringify(t.data)})}})}};function N(t){const e="width"in t?t.width:t.size,o="height"in t?t.height:t.size,r=M(t.xoffset),s=M(t.yoffset);return(r||s)&&e&&o?{x:-r/e,y:s/o}:null}function M(t){return isFinite(t)?t:0}(0,s._)([(0,a.Cb)({type:O.b,json:{write:!0}})],D.prototype,"material",void 0),(0,s._)([(0,a.Cb)({type:v,json:{write:!0}})],D.prototype,"resource",void 0),(0,s._)([(0,p.J)({Icon:"icon"},{readOnly:!0})],D.prototype,"type",void 0),(0,s._)([(0,a.Cb)(_.y)],D.prototype,"size",void 0),(0,s._)([(0,p.J)({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),(0,a.Cb)({json:{default:"center"}})],D.prototype,"anchor",void 0),(0,s._)([(0,a.Cb)({type:S,json:{type:[Number],read:{reader:t=>new S({x:t[0],y:t[1]})},write:{writer:(t,e)=>{e.anchorPosition=[t.x,t.y]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],D.prototype,"anchorPosition",void 0),(0,s._)([(0,a.Cb)({type:L,json:{write:!0}})],D.prototype,"outline",void 0),D=z=(0,s._)([(0,y.j)(k)],D);const $={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function A(t){return $[t]||(i.Z.getLogger(k).warn(`${t} cannot be mapped to Icon symbol. Fallback to "circle"`),"circle")}const P=D},20825:(t,e,o)=>{o.d(e,{Z:()=>m});var r,s=o(43697),i=o(46791),l=o(22974),n=o(5600),a=(o(75215),o(36030)),p=o(52011),y=o(87223),h=o(2283),c=o(84275),d=o(7413);const u=i.Z.ofType({base:null,key:"type",typeMap:{text:h.Z}});let b=r=class extends y.Z{constructor(t){super(t),this.verticalOffset=null,this.callout=null,this.styleOrigin=null,this.symbolLayers=new u,this.type="label-3d"}supportsCallout(){return!0}hasVisibleCallout(){return(0,c.gv)(this)}hasVisibleVerticalOffset(){return(0,c.Uy)(this)}clone(){return new r({styleOrigin:(0,l.d9)(this.styleOrigin),symbolLayers:(0,l.d9)(this.symbolLayers),thumbnail:(0,l.d9)(this.thumbnail),callout:(0,l.d9)(this.callout),verticalOffset:(0,l.d9)(this.verticalOffset)})}static fromTextSymbol(t){return new r({symbolLayers:[h.Z.fromTextSymbol(t)]})}};(0,s._)([(0,n.Cb)({type:d.Z,json:{write:!0}})],b.prototype,"verticalOffset",void 0),(0,s._)([(0,n.Cb)(c.Y2)],b.prototype,"callout",void 0),(0,s._)([(0,n.Cb)({json:{read:!1,write:!1}})],b.prototype,"styleOrigin",void 0),(0,s._)([(0,n.Cb)({type:u})],b.prototype,"symbolLayers",void 0),(0,s._)([(0,a.J)({LabelSymbol3D:"label-3d"},{readOnly:!0})],b.prototype,"type",void 0),b=r=(0,s._)([(0,p.j)("esri.symbols.LabelSymbol3D")],b);const m=b},98587:(t,e,o)=>{o.d(e,{Z:()=>m});var r,s=o(43697),i=o(46791),l=o(22974),n=o(5600),a=(o(75215),o(36030)),p=o(52011),y=o(38128),h=o(96742),c=o(87223);const d=i.Z.ofType({base:null,key:"type",typeMap:{line:y.Z,path:h.Z}}),u=i.Z.ofType({base:null,key:"type",typeMap:{line:y.Z,path:h.Z}});let b=r=class extends c.Z{constructor(t){super(t),this.symbolLayers=new d,this.type="line-3d"}clone(){return new r({styleOrigin:(0,l.d9)(this.styleOrigin),symbolLayers:(0,l.d9)(this.symbolLayers),thumbnail:(0,l.d9)(this.thumbnail)})}static fromSimpleLineSymbol(t){return new r({symbolLayers:[y.Z.fromSimpleLineSymbol(t)]})}};(0,s._)([(0,n.Cb)({type:d,json:{type:u}})],b.prototype,"symbolLayers",void 0),(0,s._)([(0,a.J)({LineSymbol3D:"line-3d"},{readOnly:!0})],b.prototype,"type",void 0),b=r=(0,s._)([(0,p.j)("esri.symbols.LineSymbol3D")],b);const m=b},38128:(t,e,o)=>{o.d(e,{Z:()=>Z});var r=o(43697),s=o(70586),i=o(62357),l=o(5600),n=(o(67676),o(80442),o(75215)),a=o(36030),p=o(52011),y=o(22303),h=o(2368),c=o(96674),d=o(57742);let u=class extends((0,h.J)(c.wq)){constructor(t){super(t),this.type="style",this.placement="begin-end",this.style="arrow",this.color=null}equals(t){return(0,s.pC)(t)&&t.placement===this.placement&&t.style===this.style&&((0,s.Wi)(this.color)&&(0,s.Wi)(t.color)||(0,s.pC)(this.color)&&(0,s.pC)(t.color)&&this.color.toJSON()===t.color.toJSON())}};(0,r._)([(0,l.Cb)({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],u.prototype,"type",void 0),(0,r._)([(0,l.Cb)({type:d.J,json:{default:"begin-end",write:!0}})],u.prototype,"placement",void 0),(0,r._)([(0,l.Cb)({type:d.k,json:{default:"arrow",write:!0}})],u.prototype,"style",void 0),(0,r._)([(0,l.Cb)({type:y.Z,json:{type:[n.z8],default:null,write:!0}})],u.prototype,"color",void 0),u=(0,r._)([(0,p.j)("esri.symbols.LineStyleMarker3D")],u);const b=u;var m,w=o(95868),g=o(4618),v=o(17495),f=o(50178),_=o(37308),C=o(52879),S=o(45119);let j=m=class extends w.Z{constructor(t){super(t),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.size=(0,i.Wz)(1),this.pattern=null,this.marker=null}clone(){const t={enabled:this.enabled,material:(0,s.pC)(this.material)?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,pattern:(0,s.pC)(this.pattern)?this.pattern.clone():null,marker:(0,s.pC)(this.marker)?this.marker.clone():null};return new m(t)}static fromSimpleLineSymbol(t){const e={enabled:!0,size:t.width??(0,i.Wz)(1),cap:t.cap||"butt",join:t.join||"miter",pattern:t.style&&"inside-frame"!==t.style?new g.Z({style:t.style}):null,material:new C.b({color:(t.color||f.ix).clone()}),marker:t.marker?new b({placement:t.marker.placement,style:t.marker.style,color:t.marker.color?.clone()??null}):null};return new m(e)}};(0,r._)([(0,l.Cb)({type:C.b,json:{write:!0}})],j.prototype,"material",void 0),(0,r._)([(0,a.J)({Line:"line"},{readOnly:!0})],j.prototype,"type",void 0),(0,r._)([(0,l.Cb)({type:S.w2,json:{write:!0,default:"miter"}})],j.prototype,"join",void 0),(0,r._)([(0,l.Cb)({type:S.Hc,json:{write:!0,default:"butt"}})],j.prototype,"cap",void 0),(0,r._)([(0,l.Cb)(_.y)],j.prototype,"size",void 0),(0,r._)([(0,l.Cb)(v.D)],j.prototype,"pattern",void 0),(0,r._)([(0,l.Cb)({types:{key:"type",base:b,typeMap:{style:b}},json:{write:!0}})],j.prototype,"marker",void 0),j=m=(0,r._)([(0,p.j)("esri.symbols.LineSymbol3DLayer")],j);const Z=j},40908:(t,e,o)=>{o.d(e,{Z:()=>p});var r=o(43697),s=o(62357),i=o(5600),l=(o(67676),o(80442),o(75215),o(52011)),n=o(89164);let a=class extends n.Z{constructor(t){super(t),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};(0,r._)([(0,i.Cb)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],a.prototype,"angle",void 0),(0,r._)([(0,i.Cb)({type:["simple-marker","picture-marker"],readOnly:!0})],a.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:Number,cast:s.t_,json:{write:!0}})],a.prototype,"xoffset",void 0),(0,r._)([(0,i.Cb)({type:Number,cast:s.t_,json:{write:!0}})],a.prototype,"yoffset",void 0),(0,r._)([(0,i.Cb)({type:Number,cast:t=>"auto"===t?t:(0,s.t_)(t),json:{write:!0}})],a.prototype,"size",void 0),a=(0,r._)([(0,l.j)("esri.symbols.MarkerSymbol")],a);const p=a},17143:(t,e,o)=>{o.d(e,{Z:()=>_});var r,s=o(43697),i=o(70586),l=o(5600),n=(o(67676),o(80442),o(75215),o(36030)),a=o(52011),p=o(95868),y=o(35454),h=o(96674),c=o(25929);const d=(0,y.w)()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});let u=r=class extends h.wq{clone(){return new r({href:this.href,primitive:this.primitive})}};(0,s._)([(0,l.Cb)({type:String,json:{read:c.r,write:c.w}})],u.prototype,"href",void 0),(0,s._)([(0,n.J)(d)],u.prototype,"primitive",void 0),u=r=(0,s._)([(0,a.j)("esri.symbols.support.ObjectSymbol3DLayerResource")],u);var b,m=o(15923);let w=b=class extends m.Z{constructor(){super(...arguments),this.x=0,this.y=0,this.z=0}clone(){return new b({x:this.x,y:this.y,z:this.z})}};(0,s._)([(0,l.Cb)({type:Number})],w.prototype,"x",void 0),(0,s._)([(0,l.Cb)({type:Number})],w.prototype,"y",void 0),(0,s._)([(0,l.Cb)({type:Number})],w.prototype,"z",void 0),w=b=(0,s._)([(0,a.j)("esri.symbols.support.Symbol3DAnchorPosition3D")],w);var g,v=o(52879);let f=g=class extends p.Z{constructor(t){super(t),this.material=null,this.castShadows=!0,this.resource=null,this.type="object",this.width=void 0,this.height=void 0,this.depth=void 0,this.anchor=void 0,this.anchorPosition=void 0,this.heading=void 0,this.tilt=void 0,this.roll=void 0}clone(){return new g({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),depth:this.depth,enabled:this.enabled,height:this.height,material:(0,i.pC)(this.material)?this.material.clone():null,castShadows:this.castShadows,resource:this.resource&&this.resource.clone(),width:this.width})}get isPrimitive(){return!this.resource||"string"!=typeof this.resource.href}};(0,s._)([(0,l.Cb)({type:v.b,json:{write:!0}})],f.prototype,"material",void 0),(0,s._)([(0,l.Cb)({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],f.prototype,"castShadows",void 0),(0,s._)([(0,l.Cb)({type:u,json:{write:!0}})],f.prototype,"resource",void 0),(0,s._)([(0,n.J)({Object:"object"},{readOnly:!0})],f.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"width",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"height",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"depth",void 0),(0,s._)([(0,n.J)({center:"center",top:"top",bottom:"bottom",origin:"origin",relative:"relative"}),(0,l.Cb)({json:{default:"origin"}})],f.prototype,"anchor",void 0),(0,s._)([(0,l.Cb)({type:w,json:{type:[Number],read:{reader:t=>new w({x:t[0],y:t[1],z:t[2]})},write:{writer:(t,e)=>{e.anchorPosition=[t.x,t.y,t.z]},overridePolicy(){return{enabled:"relative"===this.anchor}}}}})],f.prototype,"anchorPosition",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"heading",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"tilt",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],f.prototype,"roll",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],f.prototype,"isPrimitive",null),f=g=(0,s._)([(0,a.j)("esri.symbols.ObjectSymbol3DLayer")],f);const _=f},96742:(t,e,o)=>{o.d(e,{Z:()=>u});var r,s=o(43697),i=o(70586),l=o(5600),n=(o(67676),o(80442),o(75215),o(36030)),a=o(71715),p=o(52011),y=o(95868),h=o(52879),c=o(45119);let d=r=class extends y.Z{constructor(t){super(t),this.material=null,this.castShadows=!0,this.type="path",this.profile="circle",this.join="miter",this.cap="butt",this.width=void 0,this.height=void 0,this.anchor="center",this.profileRotation="all"}readWidth(t,e){return null!=t?t:null==e.height&&null!=e.size?e.size:void 0}readHeight(t,e){return null!=t?t:null==e.width&&null!=e.size?e.size:void 0}clone(){return new r({enabled:this.enabled,material:(0,i.pC)(this.material)?this.material.clone():null,castShadows:this.castShadows,profile:this.profile,join:this.join,cap:this.cap,width:this.width,height:this.height,profileRotation:this.profileRotation,anchor:this.anchor})}};(0,s._)([(0,l.Cb)({type:h.b,json:{write:!0}})],d.prototype,"material",void 0),(0,s._)([(0,l.Cb)({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],d.prototype,"castShadows",void 0),(0,s._)([(0,n.J)({Path:"path"},{readOnly:!0})],d.prototype,"type",void 0),(0,s._)([(0,l.Cb)({type:["circle","quad"],json:{write:!0,default:"circle"}})],d.prototype,"profile",void 0),(0,s._)([(0,l.Cb)({type:c.w2,json:{write:!0,default:"miter"}})],d.prototype,"join",void 0),(0,s._)([(0,l.Cb)({type:c.KW,json:{write:!0,default:"butt"}})],d.prototype,"cap",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:{enabled:!0,target:{width:{type:Number},size:{type:Number}}}}})],d.prototype,"width",void 0),(0,s._)([(0,a.r)("width",["width","size","height"])],d.prototype,"readWidth",null),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],d.prototype,"height",void 0),(0,s._)([(0,a.r)("height",["height","size","width"])],d.prototype,"readHeight",null),(0,s._)([(0,l.Cb)({type:["center","bottom","top"],json:{write:!0,default:"center"}})],d.prototype,"anchor",void 0),(0,s._)([(0,l.Cb)({type:["heading","all"],json:{write:!0,default:"all"}})],d.prototype,"profileRotation",void 0),d=r=(0,s._)([(0,p.j)("esri.symbols.PathSymbol3DLayer")],d);const u=d},37898:(t,e,o)=>{o.d(e,{Z:()=>u});var r,s=o(43697),i=o(22974),l=o(62357),n=o(5600),a=(o(75215),o(36030)),p=o(71715),y=o(52011),h=o(40908),c=o(94075);let d=r=class extends h.Z{constructor(...t){super(...t),this.color=null,this.type="picture-marker",this.url=null,this.source=null,this.height=12,this.width=12,this.size=null}normalizeCtorArgs(t,e,o){if(t&&"string"!=typeof t&&null==t.imageData)return t;const r={};return t&&(r.url=t),null!=e&&(r.width=(0,l.t_)(e)),null!=o&&(r.height=(0,l.t_)(o)),r}readHeight(t,e){return e.size||t}readWidth(t,e){return e.size||t}clone(){const t=new r({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});return t._set("source",(0,i.d9)(this.source)),t}hash(){return`${super.hash()}.${this.height}.${this.url}.${this.width}`}};(0,s._)([(0,n.Cb)({json:{write:!1}})],d.prototype,"color",void 0),(0,s._)([(0,a.J)({esriPMS:"picture-marker"},{readOnly:!0})],d.prototype,"type",void 0),(0,s._)([(0,n.Cb)(c.KA)],d.prototype,"url",void 0),(0,s._)([(0,n.Cb)(c.Ds)],d.prototype,"source",void 0),(0,s._)([(0,n.Cb)({type:Number,cast:l.t_,json:{write:!0}})],d.prototype,"height",void 0),(0,s._)([(0,p.r)("height",["height","size"])],d.prototype,"readHeight",null),(0,s._)([(0,n.Cb)({type:Number,cast:l.t_,json:{write:!0}})],d.prototype,"width",void 0),(0,s._)([(0,n.Cb)({json:{write:!1}})],d.prototype,"size",void 0),d=r=(0,s._)([(0,y.j)("esri.symbols.PictureMarkerSymbol")],d);const u=d},42143:(t,e,o)=>{o.d(e,{Z:()=>g});var r,s=o(43697),i=o(46791),l=o(22974),n=o(5600),a=(o(75215),o(36030)),p=o(52011),y=o(50575),h=o(17143),c=o(87223),d=o(2283),u=o(84275),b=o(7413);const m=i.Z.ofType({base:null,key:"type",typeMap:{icon:y.Z,object:h.Z,text:d.Z}});let w=r=class extends c.Z{constructor(t){super(t),this.verticalOffset=null,this.callout=null,this.symbolLayers=new m,this.type="point-3d"}supportsCallout(){if((this.symbolLayers?this.symbolLayers.length:0)<1)return!1;for(const t of this.symbolLayers.items)switch(t.type){case"icon":case"text":case"object":continue;default:return!1}return!0}hasVisibleCallout(){return(0,u.gv)(this)}hasVisibleVerticalOffset(){return(0,u.Uy)(this)}clone(){return new r({verticalOffset:(0,l.d9)(this.verticalOffset),callout:(0,l.d9)(this.callout),styleOrigin:(0,l.d9)(this.styleOrigin),symbolLayers:(0,l.d9)(this.symbolLayers),thumbnail:(0,l.d9)(this.thumbnail)})}static fromSimpleMarkerSymbol(t){return new r({symbolLayers:[y.Z.fromSimpleMarkerSymbol(t)]})}static fromPictureMarkerSymbol(t){return new r({symbolLayers:[y.Z.fromPictureMarkerSymbol(t)]})}static fromCIMSymbol(t){const e=t.data?.symbol?.type;return"CIMPointSymbol"!==e?null:t.data.symbol.callout?new r({symbolLayers:[y.Z.fromCIMSymbol(t)],callout:{type:"line",size:.5,color:[0,0,0]},verticalOffset:{screenLength:40}}):new r({symbolLayers:[y.Z.fromCIMSymbol(t)]})}static fromTextSymbol(t){return new r({symbolLayers:[d.Z.fromTextSymbol(t)]})}};(0,s._)([(0,n.Cb)({type:b.Z,json:{write:!0}})],w.prototype,"verticalOffset",void 0),(0,s._)([(0,n.Cb)(u.Y2)],w.prototype,"callout",void 0),(0,s._)([(0,n.Cb)({type:m,json:{origins:{"web-scene":{write:!0}}}})],w.prototype,"symbolLayers",void 0),(0,s._)([(0,a.J)({PointSymbol3D:"point-3d"},{readOnly:!0})],w.prototype,"type",void 0),w=r=(0,s._)([(0,p.j)("esri.symbols.PointSymbol3D")],w);const g=w},86114:(t,e,o)=>{o.d(e,{Z:()=>_});var r,s=o(43697),i=o(46791),l=o(22974),n=o(70586),a=o(5600),p=(o(75215),o(36030)),y=o(52011),h=o(38445),c=o(95191),d=o(50575),u=o(38128),b=o(17143),m=o(87223),w=o(2283),g=o(44398);const v=i.Z.ofType({base:null,key:"type",typeMap:{extrude:h.Z,fill:c.Z,icon:d.Z,line:u.Z,object:b.Z,text:w.Z,water:g.Z}});let f=r=class extends m.Z{constructor(t){super(t),this.symbolLayers=new v,this.type="polygon-3d"}clone(){return new r({styleOrigin:(0,l.d9)(this.styleOrigin),symbolLayers:(0,l.d9)(this.symbolLayers),thumbnail:(0,l.d9)(this.thumbnail)})}static fromJSON(t){const e=new r;if(e.read(t),2===e.symbolLayers.length&&"fill"===e.symbolLayers.getItemAt(0).type&&"line"===e.symbolLayers.getItemAt(1).type){const o=e.symbolLayers.getItemAt(0),r=e.symbolLayers.getItemAt(1);!r.enabled||t.symbolLayers&&t.symbolLayers[1]&&!1===t.symbolLayers[1].enable||(o.outline={size:r.size,color:(0,n.pC)(r.material)?r.material.color:null}),e.symbolLayers.removeAt(1)}return e}static fromSimpleFillSymbol(t){return new r({symbolLayers:[c.Z.fromSimpleFillSymbol(t)]})}};(0,s._)([(0,a.Cb)({type:v,json:{write:!0}})],f.prototype,"symbolLayers",void 0),(0,s._)([(0,p.J)({PolygonSymbol3D:"polygon-3d"},{readOnly:!0})],f.prototype,"type",void 0),f=r=(0,s._)([(0,y.j)("esri.symbols.PolygonSymbol3D")],f);const _=f},20256:(t,e,o)=>{o.d(e,{Z:()=>b});var r,s=o(43697),i=o(22303),l=o(35454),n=o(22974),a=o(5600),p=(o(75215),o(36030)),y=o(52011),h=o(21218),c=o(4095);const d=new l.X({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let u=r=class extends h.Z{constructor(...t){super(...t),this.color=new i.Z([0,0,0,.25]),this.outline=new c.Z,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(t,e,o){if(t&&"string"!=typeof t)return t;const r={};return t&&(r.style=t),e&&(r.outline=e),o&&(r.color=o),r}clone(){return new r({color:(0,n.d9)(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};(0,s._)([(0,a.Cb)()],u.prototype,"color",void 0),(0,s._)([(0,a.Cb)()],u.prototype,"outline",void 0),(0,s._)([(0,p.J)({esriSFS:"simple-fill"},{readOnly:!0})],u.prototype,"type",void 0),(0,s._)([(0,a.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],u.prototype,"style",void 0),u=r=(0,s._)([(0,y.j)("esri.symbols.SimpleFillSymbol")],u);const b=u},4095:(t,e,o)=>{o.d(e,{Z:()=>j});var r=o(43697),s=o(35454),i=o(22974),l=o(62357),n=o(5600),a=(o(75215),o(36030)),p=o(52011),y=(o(67676),o(80442),o(89164));let h=class extends y.Z{constructor(t){super(t),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};(0,r._)([(0,a.J)({esriSLS:"simple-line"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:Number,cast:l.t_,json:{write:!0}})],h.prototype,"width",void 0),h=(0,r._)([(0,p.j)("esri.symbols.LineSymbol")],h);const c=h;var d,u=o(22303),b=o(96674),m=o(71715),w=o(30556),g=o(57742);let v=d=class extends b.wq{constructor(t){super(t),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(t,e,o,r){e[o]="web-map"===r?.origin?"arrow":t}set color(t){this._set("color",t)}readColor(t){return t&&null!=t[0]?[t[0],t[1],t[2],t[3]/255]:t}writeColor(t,e,o,r){"web-map"===r?.origin||(e[o]=t)}clone(){return new d({color:(0,i.d9)(this.color),placement:this.placement,style:this.style})}hash(){return`${this.placement}.${this.color?.hash()}.${this.style}`}};(0,r._)([(0,n.Cb)({type:["begin","end","begin-end"],json:{write:!0}})],v.prototype,"placement",void 0),(0,r._)([(0,a.J)({"line-marker":"line-marker"},{readOnly:!0}),(0,n.Cb)({json:{origins:{"web-map":{write:!1}}}})],v.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:g.k})],v.prototype,"style",void 0),(0,r._)([(0,w.c)("style")],v.prototype,"writeStyle",null),(0,r._)([(0,n.Cb)({type:u.Z,value:null,json:{write:{allowNull:!0}}})],v.prototype,"color",null),(0,r._)([(0,m.r)("color")],v.prototype,"readColor",null),(0,r._)([(0,w.c)("color")],v.prototype,"writeColor",null),v=d=(0,r._)([(0,p.j)("esri.symbols.LineSymbolMarker")],v);const f=v;var _;const C=new s.X({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSInsideFrame:"inside-frame",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let S=_=class extends c{constructor(...t){super(...t),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(t,e,o,r,s,i){if(t&&"string"!=typeof t)return t;const n={};return null!=t&&(n.style=t),null!=e&&(n.color=e),null!=o&&(n.width=(0,l.t_)(o)),null!=r&&(n.cap=r),null!=s&&(n.join=s),null!=i&&(n.miterLimit=(0,l.t_)(i)),n}clone(){return new _({color:(0,i.d9)(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:this.marker?.clone()})}hash(){return`${super.hash()}.${this.color?.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${this.marker?.hash()}`}};(0,r._)([(0,a.J)({esriSLS:"simple-line"},{readOnly:!0})],S.prototype,"type",void 0),(0,r._)([(0,n.Cb)({type:C.apiValues,json:{read:C.read,write:C.write}})],S.prototype,"style",void 0),(0,r._)([(0,n.Cb)({type:["butt","round","square"],json:{write:{overridePolicy:(t,e,o)=>({enabled:"round"!==t&&(null==o||null==o.origin)})}}})],S.prototype,"cap",void 0),(0,r._)([(0,n.Cb)({type:["miter","round","bevel"],json:{write:{overridePolicy:(t,e,o)=>({enabled:"round"!==t&&(null==o||null==o.origin)})}}})],S.prototype,"join",void 0),(0,r._)([(0,n.Cb)({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":f}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],S.prototype,"marker",void 0),(0,r._)([(0,n.Cb)({type:Number,json:{read:!1,write:!1}})],S.prototype,"miterLimit",void 0),S=_=(0,r._)([(0,p.j)("esri.symbols.SimpleLineSymbol")],S);const j=S},77987:(t,e,o)=>{o.d(e,{Z:()=>w});var r,s=o(43697),i=o(22303),l=o(35454),n=o(22974),a=o(62357),p=o(5600),y=(o(75215),o(36030)),h=o(52011),c=o(30556),d=o(40908),u=o(4095);const b=new l.X({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let m=r=class extends d.Z{constructor(...t){super(...t),this.color=new i.Z([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new u.Z}normalizeCtorArgs(t,e,o,r){if(t&&"string"!=typeof t)return t;const s={};return t&&(s.style=t),null!=e&&(s.size=(0,a.t_)(e)),o&&(s.outline=o),r&&(s.color=r),s}writeColor(t,e){t&&"x"!==this.style&&"cross"!==this.style&&(e.color=t.toJSON()),null===t&&(e.color=null)}set path(t){this.style="path",this._set("path",t)}clone(){return new r({angle:this.angle,color:(0,n.d9)(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};(0,s._)([(0,p.Cb)()],m.prototype,"color",void 0),(0,s._)([(0,c.c)("color")],m.prototype,"writeColor",null),(0,s._)([(0,y.J)({esriSMS:"simple-marker"},{readOnly:!0})],m.prototype,"type",void 0),(0,s._)([(0,p.Cb)()],m.prototype,"size",void 0),(0,s._)([(0,p.Cb)({type:b.apiValues,json:{read:b.read,write:b.write}})],m.prototype,"style",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],m.prototype,"path",null),(0,s._)([(0,p.Cb)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":u.Z}},json:{default:null,write:!0}})],m.prototype,"outline",void 0),m=r=(0,s._)([(0,h.j)("esri.symbols.SimpleMarkerSymbol")],m);const w=m},87223:(t,e,o)=>{o.d(e,{Z:()=>D});var r=o(43697),s=o(46791),i=o(70921),l=o(92604),n=o(17452),a=o(20941),p=o(5600),y=(o(67676),o(80442),o(90578)),h=o(71715),c=o(52011),d=o(30556),u=o(65587),b=o(25929),m=o(38445),w=o(95191),g=o(50575),v=o(38128),f=o(17143),_=o(96742),C=o(89164),S=o(95868),j=o(2283),Z=o(44398),x=o(71144),L=o(23203);const z={icon:g.Z,object:f.Z,line:v.Z,path:_.Z,fill:w.Z,extrude:m.Z,text:j.Z,water:Z.Z},O=s.Z.ofType({base:S.Z,key:"type",typeMap:z,errorContext:"symbol-layer"});let k=class extends C.Z{constructor(t){super(t),this.styleOrigin=null,this.thumbnail=null,this.type=null;const e=this.__accessor__&&this.__accessor__.metadatas&&this.__accessor__.metadatas.symbolLayers,o=e&&e.type||s.Z;this._set("symbolLayers",new o)}get color(){return null}set color(t){this.constructed&&l.Z.getLogger(this.declaredClass).error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")}set symbolLayers(t){(0,i.Z)(t,this._get("symbolLayers"))}readStyleOrigin(t,e,o){if(t.styleUrl&&t.name){const e=(0,b.f)(t.styleUrl,o);return new x.Z({styleUrl:e,name:t.name})}if(t.styleName&&t.name)return new x.Z({portal:o&&o.portal||u.Z.getDefault(),styleName:t.styleName,name:t.name});o&&o.messages&&o.messages.push(new a.Z("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:o,definition:t}))}writeStyleOrigin(t,e,o,r){if(t.styleUrl&&t.name){let o=(0,b.t)(t.styleUrl,r);(0,n.YP)(o)&&(o=(0,n.Fv)(o)),e.styleOrigin={styleUrl:o,name:t.name}}else t.styleName&&t.name&&(t.portal&&r&&r.portal&&!(0,n.tm)(t.portal.restUrl,r.portal.restUrl)?r&&r.messages&&r.messages.push(new a.Z("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):e.styleOrigin={styleName:t.styleName,name:t.name})}normalizeCtorArgs(t){return t instanceof S.Z||t&&z[t.type]?{symbolLayers:[t]}:Array.isArray(t)?{symbolLayers:t}:t}};(0,r._)([(0,p.Cb)({json:{read:!1,write:!1}})],k.prototype,"color",null),(0,r._)([(0,p.Cb)({type:O,nonNullable:!0,json:{write:!0}}),(0,y.p)(i.R)],k.prototype,"symbolLayers",null),(0,r._)([(0,p.Cb)({type:x.Z})],k.prototype,"styleOrigin",void 0),(0,r._)([(0,h.r)("styleOrigin")],k.prototype,"readStyleOrigin",null),(0,r._)([(0,d.c)("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],k.prototype,"writeStyleOrigin",null),(0,r._)([(0,p.Cb)({type:L.p,json:{read:!1}})],k.prototype,"thumbnail",void 0),(0,r._)([(0,p.Cb)({type:["point-3d","line-3d","polygon-3d","mesh-3d","label-3d"],readOnly:!0})],k.prototype,"type",void 0),k=(0,r._)([(0,c.j)("esri.symbols.Symbol3D")],k);const D=k},95868:(t,e,o)=>{o.d(e,{Z:()=>p});var r=o(43697),s=o(96674),i=o(5600),l=(o(67676),o(80442),o(75215),o(52011)),n=o(30556);let a=class extends s.wq{constructor(t){super(t),this.enabled=!0,this.type=null}writeEnabled(t,e,o){t||(e[o]=t)}};(0,r._)([(0,i.Cb)({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],a.prototype,"enabled",void 0),(0,r._)([(0,n.c)("enabled")],a.prototype,"writeEnabled",null),(0,r._)([(0,i.Cb)({type:["icon","object","line","path","fill","water","extrude","text"],readOnly:!0})],a.prototype,"type",void 0),a=(0,r._)([(0,l.j)("esri.symbols.Symbol3DLayer")],a);const p=a},78724:(t,e,o)=>{o.d(e,{Z:()=>w});var r,s=o(43697),i=o(22303),l=o(22974),n=o(62357),a=o(5600),p=o(90578),y=o(36030),h=o(52011),c=o(30556),d=o(31134),u=o(89164),b=o(61565);let m=r=class extends u.Z{constructor(...t){super(...t),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new d.Z,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(t,e,o){if(t&&"string"!=typeof t)return t;const r={};return t&&(r.text=t),e&&(r.font=e),o&&(r.color=o),r}writeLineWidth(t,e,o,r){r&&"string"!=typeof r?r.origin:e[o]=t}castLineWidth(t){return(0,n.t_)(t)}writeLineHeight(t,e,o,r){r&&"string"!=typeof r?r.origin:e[o]=t}clone(){return new r({angle:this.angle,backgroundColor:(0,l.d9)(this.backgroundColor),borderLineColor:(0,l.d9)(this.borderLineColor),borderLineSize:this.borderLineSize,color:(0,l.d9)(this.color),font:this.font&&this.font.clone(),haloColor:(0,l.d9)(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor&&this.backgroundColor.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color.hash()}.${this.font&&this.font.hash()}.${this.haloColor&&this.haloColor.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};(0,s._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],m.prototype,"backgroundColor",void 0),(0,s._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],m.prototype,"borderLineColor",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"borderLineSize",void 0),(0,s._)([(0,a.Cb)({type:d.Z,json:{write:!0}})],m.prototype,"font",void 0),(0,s._)([(0,a.Cb)({...b.x0,json:{write:!0}})],m.prototype,"horizontalAlignment",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"kerning",void 0),(0,s._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],m.prototype,"haloColor",void 0),(0,s._)([(0,a.Cb)({type:Number,cast:n.t_,json:{write:!0}})],m.prototype,"haloSize",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"rightToLeft",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"rotated",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"text",void 0),(0,s._)([(0,y.J)({esriTS:"text"},{readOnly:!0})],m.prototype,"type",void 0),(0,s._)([(0,a.Cb)({...b.Nj,json:{write:!0}})],m.prototype,"verticalAlignment",void 0),(0,s._)([(0,a.Cb)({type:Number,cast:n.t_,json:{write:!0}})],m.prototype,"xoffset",void 0),(0,s._)([(0,a.Cb)({type:Number,cast:n.t_,json:{write:!0}})],m.prototype,"yoffset",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],m.prototype,"angle",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"width",void 0),(0,s._)([(0,a.Cb)({type:Number})],m.prototype,"lineWidth",void 0),(0,s._)([(0,c.c)("lineWidth")],m.prototype,"writeLineWidth",null),(0,s._)([(0,p.p)("lineWidth")],m.prototype,"castLineWidth",null),(0,s._)([(0,a.Cb)(b.Ck)],m.prototype,"lineHeight",void 0),(0,s._)([(0,c.c)("lineHeight")],m.prototype,"writeLineHeight",null),m=r=(0,s._)([(0,h.j)("esri.symbols.TextSymbol")],m);const w=m},2283:(t,e,o)=>{o.d(e,{Z:()=>j});var r,s=o(43697),i=o(22974),l=o(70586),n=o(5600),a=(o(75215),o(36030)),p=o(52011),y=o(30556),h=o(31134),c=o(95868),d=o(37308),u=o(22303),b=o(96674);let m=r=class extends b.wq{constructor(){super(...arguments),this.color=new u.Z([0,0,0,1]),this.size=0}clone(){const t={color:(0,i.d9)(this.color),size:this.size};return new r(t)}};(0,s._)([(0,n.Cb)(d.a)],m.prototype,"color",void 0),(0,s._)([(0,n.Cb)(d.y)],m.prototype,"size",void 0),m=r=(0,s._)([(0,p.j)("esri.symbols.support.Symbol3DHalo")],m);var w=o(52879),g=o(2368);o(67676),o(80442);let v=class extends((0,g.J)(b.wq)){constructor(t){super(t),this.color=null}};(0,s._)([(0,n.Cb)(d.a)],v.prototype,"color",void 0),v=(0,s._)([(0,p.j)("esri.symbols.support.Symbol3DTextBackground")],v);var f,_=o(61565);let C=f=class extends c.Z{constructor(t){super(t),this._userSize=void 0,this.halo=null,this.horizontalAlignment="center",this.lineHeight=1,this.material=null,this.background=null,this.text=null,this.type="text",this.verticalAlignment="baseline"}get font(){return this._get("font")||null}set font(t){(0,l.pC)(t)&&(0,l.pC)(this._userSize)&&(t.size=this._userSize),this._set("font",t)}writeFont(t,e,o,r){const s={...r,textSymbol3D:!0};e.font=t.write({},s),delete e.font.size}get size(){return(0,l.pC)(this._userSize)?this._userSize:(0,l.pC)(this.font)&&null!=this.font.size?this.font.size:9}set size(t){this._userSize=t,(0,l.pC)(this.font)&&(this.font.size=this._userSize),this.notifyChange("size")}clone(){const t=new f({enabled:this.enabled,font:this.font&&(0,i.d9)(this.font),halo:this.halo&&(0,i.d9)(this.halo),horizontalAlignment:this.horizontalAlignment,lineHeight:this.lineHeight,material:(0,l.pC)(this.material)?this.material.clone():null,text:this.text,verticalAlignment:this.verticalAlignment,background:(0,i.d9)(this.background)});return t._userSize=this._userSize,t}static fromTextSymbol(t){return new f({font:(0,l.pC)(t.font)?t.font.clone():new h.Z,halo:S(t.haloColor,t.haloSize),horizontalAlignment:t.horizontalAlignment,lineHeight:t.lineHeight,material:t.color?new w.b({color:t.color.clone()}):null,text:t.text,verticalAlignment:t.verticalAlignment,background:t.backgroundColor?new v({color:t.backgroundColor.clone()}):null})}};function S(t,e){return t&&e>0?new m({color:(0,i.d9)(t),size:e}):null}(0,s._)([(0,n.Cb)({type:h.Z,json:{write:!0}})],C.prototype,"font",null),(0,s._)([(0,y.c)("font")],C.prototype,"writeFont",null),(0,s._)([(0,n.Cb)({type:m,json:{write:!0}})],C.prototype,"halo",void 0),(0,s._)([(0,n.Cb)({..._.x0,json:{default:"center",write:!0}})],C.prototype,"horizontalAlignment",void 0),(0,s._)([(0,n.Cb)({..._.Ck,json:{default:1,write:!0}})],C.prototype,"lineHeight",void 0),(0,s._)([(0,n.Cb)({type:w.b,json:{write:!0}})],C.prototype,"material",void 0),(0,s._)([(0,n.Cb)({type:v,json:{write:!0}})],C.prototype,"background",void 0),(0,s._)([(0,n.Cb)(d.y)],C.prototype,"size",null),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],C.prototype,"text",void 0),(0,s._)([(0,a.J)({Text:"text"},{readOnly:!0})],C.prototype,"type",void 0),(0,s._)([(0,n.Cb)({..._.Nj,json:{default:"baseline",write:!0}})],C.prototype,"verticalAlignment",void 0),C=f=(0,s._)([(0,p.j)("esri.symbols.TextSymbol3DLayer")],C);const j=C},44398:(t,e,o)=>{o.d(e,{Z:()=>u});var r,s=o(43697),i=o(22303),l=o(22974),n=o(5600),a=o(75215),p=o(36030),y=o(52011),h=o(95868);let c=r=class extends h.Z{constructor(t){super(t),this.color=d.clone(),this.type="water",this.waterbodySize="medium",this.waveDirection=null,this.waveStrength="moderate"}clone(){return new r({color:(0,l.d9)(this.color),waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength})}};(0,s._)([(0,n.Cb)({type:i.Z,nonNullable:!0,json:{type:[a.z8],write:(t,e,o)=>e[o]=t.toArray(i.Z.AlphaMode.UNLESS_OPAQUE),default:()=>d.clone(),defaultEquals:t=>t.toCss(!0)===d.toCss(!0)}})],c.prototype,"color",void 0),(0,s._)([(0,p.J)({Water:"water"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,n.Cb)({type:["small","medium","large"],json:{write:!0,default:"medium"}})],c.prototype,"waterbodySize",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:!0,default:null}})],c.prototype,"waveDirection",void 0),(0,s._)([(0,n.Cb)({type:["calm","rippled","slight","moderate"],json:{write:!0,default:"moderate"}})],c.prototype,"waveStrength",void 0),c=r=(0,s._)([(0,y.j)("esri.symbols.WaterSymbol3DLayer")],c);const d=new i.Z([0,119,190]),u=c},59390:(t,e,o)=>{o.d(e,{Z:()=>m});var r,s=o(43697),i=o(92604),l=o(70586),n=o(95330),a=o(5600),p=(o(67676),o(80442),o(75215),o(36030)),y=o(52011),h=o(65587),c=o(25929),d=o(89164),u=o(23203);let b=r=class extends d.Z{constructor(t){super(t),this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=(0,l.pC)(this.portal)?this.portal:h.Z.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e?e.portal:void 0,super.read(t,e)}clone(){return new r({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){return this._fetchSymbol("webRef",t)}fetchCIMSymbol(t){return this._fetchSymbol("cimRef",t)}async _fetchSymbol(t,e){const r=(0,l.pC)(e)?e.cache:null,s=r?this._fetchCacheKey:null;if((0,l.pC)(r)){const t=r.get(s);if(t)return t.clone()}const a=await o.e(4499).then(o.bind(o,74499));(0,n.k_)(e);const p=a.resolveWebStyleSymbol(this,{portal:this.portal},t,e);p.catch((t=>{i.Z.getLogger(this.declaredClass).error("#fetchSymbol()","Failed to create symbol from style",t)}));const y=await p;return"webRef"===t&&"point-3d"===y.type||"cimRef"===t&&"cim"===y.type?((0,l.pC)(r)&&r.set(s,y.clone()),y):null}};(0,s._)([(0,a.Cb)({json:{write:!1}})],b.prototype,"color",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],b.prototype,"styleName",void 0),(0,s._)([(0,a.Cb)({type:h.Z,json:{write:!1}})],b.prototype,"portal",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:c.r,write:c.w}})],b.prototype,"styleUrl",void 0),(0,s._)([(0,a.Cb)({type:u.p,json:{read:!1}})],b.prototype,"thumbnail",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],b.prototype,"name",void 0),(0,s._)([(0,p.J)({styleSymbolReference:"web-style"},{readOnly:!0})],b.prototype,"type",void 0),(0,s._)([(0,a.Cb)()],b.prototype,"_fetchCacheKey",null),b=r=(0,s._)([(0,y.j)("esri.symbols.WebStyleSymbol")],b);const m=b},27539:(t,e,o)=>{o.d(e,{Z:()=>a});var r=o(43697),s=o(96674),i=o(5600),l=(o(67676),o(80442),o(75215),o(52011));let n=class extends s.wq{constructor(t){super(t),this.visible=!0}clone(){}};(0,r._)([(0,i.Cb)({type:["line"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],n.prototype,"type",void 0),(0,r._)([(0,i.Cb)({readOnly:!0})],n.prototype,"visible",void 0),n=(0,r._)([(0,l.j)("esri.symbols.callouts.Callout3D")],n);const a=n},69496:(t,e,o)=>{o.d(e,{Z:()=>m});var r,s=o(43697),i=o(22303),l=o(22974),n=o(70586),a=o(62357),p=o(5600),y=(o(75215),o(36030)),h=o(52011),c=o(27539),d=o(6352),u=o(37308);let b=r=class extends c.Z{constructor(t){super(t),this.type="line",this.color=new i.Z([0,0,0,1]),this.size=(0,a.Wz)(1),this.border=null}get visible(){return this.size>0&&(0,n.pC)(this.color)&&this.color.a>0}clone(){return new r({color:(0,l.d9)(this.color),size:this.size,border:(0,l.d9)(this.border)})}};(0,s._)([(0,y.J)({line:"line"},{readOnly:!0})],b.prototype,"type",void 0),(0,s._)([(0,p.Cb)(u.a)],b.prototype,"color",void 0),(0,s._)([(0,p.Cb)(u.y)],b.prototype,"size",void 0),(0,s._)([(0,p.Cb)({type:d.a,json:{write:!0}})],b.prototype,"border",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],b.prototype,"visible",null),b=r=(0,s._)([(0,h.j)("esri.symbols.callouts.LineCallout3D")],b);const m=b},84275:(t,e,o)=>{o.d(e,{Uy:()=>l,Y2:()=>a,gv:()=>n});var r=o(70586),s=o(27539),i=o(69496);function l(t){if(!t)return!1;const e=t.verticalOffset;return!!e&&!(e.screenLength<=0||(0,r.pC)(e.maxWorldLength)&&e.maxWorldLength<=0)}function n(t){if(!t)return!1;if(!t.supportsCallout||!t.supportsCallout())return!1;const e=t.callout;return!!e&&!!e.visible&&!!l(t)}const a={types:{key:"type",base:s.Z,typeMap:{line:i.Z}},json:{write:!0}}},56332:(t,e,o)=>{o.d(e,{Z:()=>v});var r=o(43697),s=o(22303),i=o(96674),l=o(22974),n=o(62357),a=o(5600),p=(o(75215),o(52011)),y=o(37308);let h=class extends i.wq{constructor(t){super(t),this.color=new s.Z([0,0,0,1]),this.extensionLength=0,this.size=(0,n.Wz)(1)}clone(){}cloneProperties(){return{color:(0,l.d9)(this.color),size:this.size,extensionLength:this.extensionLength}}};(0,r._)([(0,a.Cb)({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],h.prototype,"type",void 0),(0,r._)([(0,a.Cb)(y.a)],h.prototype,"color",void 0),(0,r._)([(0,a.Cb)({...y.y,json:{write:{overridePolicy:t=>({enabled:!!t})}}})],h.prototype,"extensionLength",void 0),(0,r._)([(0,a.Cb)(y.y)],h.prototype,"size",void 0),h=(0,r._)([(0,p.j)("esri.symbols.edges.Edges3D")],h);const c=h;o(92604),o(67676),o(80442),o(20102);var d,u=o(36030);let b=d=class extends c{constructor(t){super(t),this.type="sketch"}clone(){return new d(this.cloneProperties())}};(0,r._)([(0,u.J)({sketch:"sketch"},{readOnly:!0})],b.prototype,"type",void 0),b=d=(0,r._)([(0,p.j)("esri.symbols.edges.SketchEdges3D")],b);const m=b;var w;let g=w=class extends c{constructor(t){super(t),this.type="solid"}clone(){return new w(this.cloneProperties())}};(0,r._)([(0,u.J)({solid:"solid"},{readOnly:!0})],g.prototype,"type",void 0),g=w=(0,r._)([(0,p.j)("esri.symbols.support.SolidEdges3D")],g);const v={types:{key:"type",base:c,typeMap:{solid:g,sketch:m}},json:{write:!0}}},32626:(t,e,o)=>{o.d(e,{Z:()=>a});var r=o(43697),s=o(96674),i=o(5600),l=(o(67676),o(80442),o(75215),o(52011));let n=class extends s.wq{constructor(t){super(t)}clone(){}};(0,r._)([(0,i.Cb)({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],n.prototype,"type",void 0),n=(0,r._)([(0,l.j)("esri.symbols.patterns.LinePattern3D")],n);const a=n},4618:(t,e,o)=>{o.d(e,{Z:()=>c});var r,s=o(43697),i=o(35454),l=o(5600),n=(o(67676),o(80442),o(75215),o(36030)),a=o(52011),p=o(32626);const y=(0,i.w)()({dash:"dash","dash-dot":"dash-dot","dash-dot-dot":"long-dash-dot-dot",dot:"dot","long-dash":"long-dash","long-dash-dot":"long-dash-dot",null:"none","short-dash":"short-dash","short-dash-dot":"short-dash-dot","short-dash-dot-dot":"short-dash-dot-dot","short-dot":"short-dot",solid:"solid"});let h=r=class extends p.Z{constructor(t){super(t),this.type="style",this.style="solid"}clone(){const t={style:this.style};return new r(t)}};(0,s._)([(0,l.Cb)({type:["style"]})],h.prototype,"type",void 0),(0,s._)([(0,n.J)(y),(0,l.Cb)({type:["dash","dash-dot","dot","long-dash","long-dash-dot","long-dash-dot-dot","none","short-dash","short-dash-dot","short-dash-dot-dot","short-dot","solid"]})],h.prototype,"style",void 0),h=r=(0,s._)([(0,a.j)("esri.symbols.patterns.LineStylePattern3D")],h);const c=h},41776:(t,e,o)=>{o.d(e,{Z:()=>a});var r=o(43697),s=o(96674),i=o(5600),l=(o(67676),o(80442),o(75215),o(52011));let n=class extends s.wq{constructor(t){super(t)}clone(){}};(0,r._)([(0,i.Cb)({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],n.prototype,"type",void 0),n=(0,r._)([(0,l.j)("esri.symbols.patterns.Pattern3D")],n);const a=n},74721:(t,e,o)=>{o.d(e,{Z:()=>p});var r,s=o(43697),i=o(5600),l=(o(67676),o(80442),o(75215),o(52011)),n=o(41776);let a=r=class extends n.Z{constructor(t){super(t),this.type="style",this.style="solid"}clone(){const t={style:this.style};return new r(t)}};(0,s._)([(0,i.Cb)({type:["style"]})],a.prototype,"type",void 0),(0,s._)([(0,i.Cb)({type:["backward-diagonal","cross","diagonal-cross","forward-diagonal","horizontal","none","solid","vertical"],json:{read:!0,write:!0}})],a.prototype,"style",void 0),a=r=(0,s._)([(0,l.j)("esri.symbols.patterns.StylePattern3D")],a);const p=a},17495:(t,e,o)=>{o.d(e,{D:()=>a,q:()=>n});var r=o(32626),s=o(4618),i=o(41776),l=o(74721);const n={types:{key:"type",base:i.Z,typeMap:{style:l.Z}},json:{write:!0}},a={types:{key:"type",base:r.Z,typeMap:{style:s.Z}},json:{write:!0}}},71144:(t,e,o)=>{o.d(e,{Z:()=>y});var r,s=o(43697),i=o(15923),l=o(5600),n=(o(67676),o(80442),o(75215),o(52011)),a=o(65587);let p=r=class extends i.Z{constructor(t){super(t),this.name=null,this.styleUrl=null,this.styleName=null,this.portal=null}clone(){return new r({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}};(0,s._)([(0,l.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:String})],p.prototype,"styleUrl",void 0),(0,s._)([(0,l.Cb)({type:String})],p.prototype,"styleName",void 0),(0,s._)([(0,l.Cb)({type:a.Z})],p.prototype,"portal",void 0),p=r=(0,s._)([(0,n.j)("esri.symbols.support.StyleOrigin")],p);const y=p},52879:(t,e,o)=>{o.d(e,{b:()=>y});var r,s=o(43697),i=o(96674),l=o(70586),n=o(5600),a=(o(67676),o(80442),o(75215),o(52011)),p=o(37308);let y=r=class extends i.wq{constructor(t){super(t),this.color=null}clone(){const t={color:(0,l.pC)(this.color)?this.color.clone():null};return new r(t)}};(0,s._)([(0,n.Cb)(p.a)],y.prototype,"color",void 0),y=r=(0,s._)([(0,a.j)("esri.symbols.support.Symbol3DMaterial")],y)},7413:(t,e,o)=>{o.d(e,{Z:()=>y});var r,s=o(43697),i=o(96674),l=o(5600),n=(o(67676),o(80442),o(75215),o(52011)),a=o(37308);let p=r=class extends i.wq{constructor(t){super(t),this.screenLength=0,this.minWorldLength=0,this.maxWorldLength=null}clone(){return new r({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})}};(0,s._)([(0,l.Cb)(a.y)],p.prototype,"screenLength",void 0),(0,s._)([(0,l.Cb)({type:Number,nonNullable:!0,json:{write:!0,default:0}})],p.prototype,"minWorldLength",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],p.prototype,"maxWorldLength",void 0),p=r=(0,s._)([(0,n.j)("esri.symbols.support.Symbol3DVerticalOffset")],p);const y=p},23203:(t,e,o)=>{o.d(e,{p:()=>a});var r,s=o(43697),i=o(15923),l=o(5600),n=(o(67676),o(80442),o(75215),o(52011));let a=r=class extends i.Z{constructor(){super(...arguments),this.url=""}clone(){return new r({url:this.url})}};(0,s._)([(0,l.Cb)({type:String})],a.prototype,"url",void 0),a=r=(0,s._)([(0,n.j)("esri.symbols.support.Thumbnail")],a)},50178:(t,e,o)=>{o.d(e,{ix:()=>s,l9:()=>i,rx:()=>l});var r=o(22303);const s=new r.Z("white"),i=(new r.Z("black"),new r.Z([255,255,255,0]));function l(t){return 0===t.r&&0===t.g&&0===t.b}},57742:(t,e,o)=>{o.d(e,{J:()=>r,k:()=>s});const r=["begin","end","begin-end"],s=["arrow","circle","square","diamond","cross","x"]},37308:(t,e,o)=>{o.d(e,{a:()=>n,y:()=>a});var r=o(22303),s=o(62357),i=o(75215),l=o(65242);const n={type:r.Z,json:{type:[i.z8],default:null,read:{source:["color","transparency"],reader:function(t,e){const o=null!=e.transparency?(0,l.b)(e.transparency):1,s=e.color;return s&&Array.isArray(s)?new r.Z([s[0]||0,s[1]||0,s[2]||0,o]):null}},write:{target:{color:{type:[i.z8]},transparency:{type:i.z8}},writer:function(t,e){e.color=t.toJSON().slice(0,3);const o=(0,l.a)(t.a);0!==o&&(e.transparency=o)}}}},a={type:Number,cast:s.t_,json:{write:!0}}},45119:(t,e,o)=>{o.d(e,{$K:()=>i,Hc:()=>y,KW:()=>h,Uz:()=>p,w2:()=>c}),o(80442);var r=o(65617),s=o(60437);function i(t,{isPrimitive:e,width:o,depth:s,height:i}){const l=e?10:1;if(null==o&&null==i&&null==s)return[l*t[0],l*t[1],l*t[2]];const n=(0,r.f)(o,s,i);let a;for(let e=0;e<3;e++){const o=n[e];if(null!=o){a=o/t[e];break}}for(let e=0;e<3;e++)null==n[e]&&(n[e]=t[e]*a);return n}const l=(0,s.al)(-.5,-.5,-.5,.5,.5,.5),n=(0,s.al)(-.5,-.5,0,.5,.5,1),a=(0,s.al)(-.5,-.5,0,.5,.5,.5);function p(t){switch(t){case"sphere":case"cube":case"diamond":return l;case"cylinder":case"cone":case"inverted-cone":return n;case"tetrahedron":return a;default:return}}const y=["butt","square","round"],h=[...y,"none"],c=["miter","bevel","round"]},61565:(t,e,o)=>{o.d(e,{Ck:()=>a,JT:()=>i,Nj:()=>y,g6:()=>l,vC:()=>n,x0:()=>p});var r=o(22021),s=o(75215);const i=["none","underline","line-through"],l=["normal","italic","oblique"],n=["normal","lighter","bold","bolder"],a={type:Number,cast:t=>{const e=(0,s.q9)(t);return 0===e?1:(0,r.uZ)(e,.1,4)},nonNullable:!0},p={type:["left","right","center"],nonNullable:!0},y={type:["baseline","top","middle","bottom"],nonNullable:!0}},94075:(t,e,o)=>{o.d(e,{Ds:()=>n,KA:()=>l});var r=o(17452),s=o(25929);function i(t,e){return function(t){return!(null==t||"service"!==t.origin&&"portal-item"!==t.origin||"feature"!==t.layer?.type&&"stream"!==t.layer?.type)}(e)&&!(0,r.YP)(t)&&e?.layer?.parsedUrl?(0,r.v_)(e.layer.parsedUrl.path,"images",t):(0,s.f)(t,e)}const l={json:{read:{source:["imageData","url"],reader:function(t,e,o){return e.imageData?(0,r._l)({mediaType:e.contentType||"image/png",isBase64:!0,data:e.imageData}):i(e.url,o)}},write:{writer(t,e,o,i){!function(t,e,o,i){if((0,r.HK)(t)){const l=(0,r.sJ)(t);if(!l)return;e.contentType=l.mediaType,e.imageData=l.data,o&&o.imageData===e.imageData&&o.url&&(0,s.w)(o.url,e,"url",i)}else(0,s.w)(t,e,"url",i)}(t,e,this.source,i)}}}},n={readOnly:!0,json:{read:{source:["imageData","url"],reader(t,e,o){const r={};return e.imageData&&(r.imageData=e.imageData),e.contentType&&(r.contentType=e.contentType),e.url&&(r.url=i(e.url,o)),r}}}}}}]);