streamlit-nightly 1.45.1.dev20250508__py3-none-any.whl → 1.45.1.dev20250509__py3-none-any.whl

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 (188) hide show
  1. streamlit/auth_util.py +3 -3
  2. streamlit/cli_util.py +3 -2
  3. streamlit/commands/logo.py +2 -2
  4. streamlit/commands/navigation.py +5 -4
  5. streamlit/commands/page_config.py +3 -1
  6. streamlit/components/types/base_custom_component.py +7 -7
  7. streamlit/components/v1/custom_component.py +6 -6
  8. streamlit/config.py +9 -9
  9. streamlit/config_option.py +2 -2
  10. streamlit/connections/base_connection.py +3 -3
  11. streamlit/connections/snowflake_connection.py +5 -5
  12. streamlit/connections/snowpark_connection.py +3 -3
  13. streamlit/connections/sql_connection.py +9 -10
  14. streamlit/cursor.py +6 -6
  15. streamlit/delta_generator.py +7 -6
  16. streamlit/delta_generator_singletons.py +2 -2
  17. streamlit/deprecation_util.py +1 -1
  18. streamlit/elements/arrow.py +2 -3
  19. streamlit/elements/dialog_decorator.py +3 -3
  20. streamlit/elements/doc_string.py +20 -20
  21. streamlit/elements/layouts.py +26 -7
  22. streamlit/elements/lib/built_in_chart_utils.py +37 -39
  23. streamlit/elements/lib/color_util.py +3 -3
  24. streamlit/elements/lib/column_types.py +2 -2
  25. streamlit/elements/lib/dialog.py +2 -2
  26. streamlit/elements/lib/event_utils.py +1 -1
  27. streamlit/elements/lib/mutable_status_container.py +1 -1
  28. streamlit/elements/lib/policies.py +3 -3
  29. streamlit/elements/lib/utils.py +5 -5
  30. streamlit/elements/progress.py +9 -12
  31. streamlit/elements/vega_charts.py +2 -2
  32. streamlit/elements/widgets/button_group.py +2 -2
  33. streamlit/elements/widgets/data_editor.py +2 -2
  34. streamlit/elements/widgets/multiselect.py +2 -2
  35. streamlit/elements/widgets/selectbox.py +1 -1
  36. streamlit/elements/widgets/slider.py +16 -14
  37. streamlit/elements/write.py +3 -6
  38. streamlit/errors.py +34 -21
  39. streamlit/external/langchain/streamlit_callback_handler.py +2 -2
  40. streamlit/file_util.py +8 -8
  41. streamlit/git_util.py +1 -1
  42. streamlit/hello/dataframe_demo.py +1 -1
  43. streamlit/hello/mapping_demo.py +1 -1
  44. streamlit/navigation/page.py +1 -1
  45. streamlit/proto/Block_pb2.py +38 -29
  46. streamlit/proto/Block_pb2.pyi +68 -4
  47. streamlit/proto/GapSize_pb2.py +29 -0
  48. streamlit/proto/GapSize_pb2.pyi +70 -0
  49. streamlit/proto/HeightConfig_pb2.py +27 -0
  50. streamlit/proto/HeightConfig_pb2.pyi +48 -0
  51. streamlit/proto/WidthConfig_pb2.py +2 -2
  52. streamlit/proto/WidthConfig_pb2.pyi +15 -1
  53. streamlit/runtime/app_session.py +2 -2
  54. streamlit/runtime/caching/cache_data_api.py +9 -5
  55. streamlit/runtime/caching/cache_errors.py +3 -3
  56. streamlit/runtime/caching/cache_resource_api.py +7 -7
  57. streamlit/runtime/caching/cache_utils.py +9 -9
  58. streamlit/runtime/caching/cached_message_replay.py +1 -1
  59. streamlit/runtime/caching/hashing.py +70 -74
  60. streamlit/runtime/caching/legacy_cache_api.py +1 -1
  61. streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +3 -1
  62. streamlit/runtime/caching/storage/local_disk_cache_storage.py +1 -1
  63. streamlit/runtime/connection_factory.py +12 -12
  64. streamlit/runtime/context.py +2 -2
  65. streamlit/runtime/credentials.py +3 -3
  66. streamlit/runtime/fragment.py +3 -4
  67. streamlit/runtime/media_file_manager.py +2 -2
  68. streamlit/runtime/memory_media_file_storage.py +1 -1
  69. streamlit/runtime/memory_uploaded_file_manager.py +1 -1
  70. streamlit/runtime/metrics_util.py +5 -6
  71. streamlit/runtime/pages_manager.py +3 -3
  72. streamlit/runtime/runtime.py +1 -1
  73. streamlit/runtime/runtime_util.py +2 -2
  74. streamlit/runtime/scriptrunner/exec_code.py +10 -3
  75. streamlit/runtime/scriptrunner/magic.py +13 -8
  76. streamlit/runtime/scriptrunner/script_runner.py +2 -2
  77. streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
  78. streamlit/runtime/scriptrunner_utils/script_run_context.py +6 -5
  79. streamlit/runtime/secrets.py +8 -11
  80. streamlit/runtime/state/query_params.py +2 -2
  81. streamlit/runtime/state/safe_session_state.py +2 -2
  82. streamlit/runtime/state/session_state.py +17 -15
  83. streamlit/runtime/stats.py +1 -1
  84. streamlit/runtime/uploaded_file_manager.py +1 -1
  85. streamlit/source_util.py +3 -4
  86. streamlit/static/index.html +1 -1
  87. streamlit/static/static/js/{ErrorOutline.esm.C9UoaGEN.js → ErrorOutline.esm.C-0hf1-k.js} +1 -1
  88. streamlit/static/static/js/{FileDownload.esm.DoToR9q0.js → FileDownload.esm.B-fFGI-X.js} +1 -1
  89. streamlit/static/static/js/{FileHelper.Bt4VJ--Q.js → FileHelper.ACYo0OZo.js} +1 -1
  90. streamlit/static/static/js/{FormClearHelper.D5PbW8FI.js → FormClearHelper.CVNTT-bJ.js} +1 -1
  91. streamlit/static/static/js/{Hooks.DgkQ2Xp9.js → Hooks.C3thlpd2.js} +1 -1
  92. streamlit/static/static/js/{InputInstructions.DLnLhwHI.js → InputInstructions.CwAxousX.js} +1 -1
  93. streamlit/static/static/js/{ProgressBar.BtSgh_K-.js → ProgressBar.xh599Rum.js} +1 -1
  94. streamlit/static/static/js/{RenderInPortalIfExists.CjdyBvQX.js → RenderInPortalIfExists.CQLIsNPE.js} +1 -1
  95. streamlit/static/static/js/{Toolbar.CAYIzVZk.js → Toolbar.LKdyvP0u.js} +1 -1
  96. streamlit/static/static/js/{base-input.CD4xW4_9.js → base-input.D8OdS4WW.js} +1 -1
  97. streamlit/static/static/js/{checkbox.Ba4jj5dR.js → checkbox.DSdYKlOI.js} +1 -1
  98. streamlit/static/static/js/{createSuper.BBGT9Ijd.js → createSuper.B2pyCfWw.js} +1 -1
  99. streamlit/static/static/js/{data-grid-overlay-editor.CYuk1Aj7.js → data-grid-overlay-editor.DhO2r0ne.js} +1 -1
  100. streamlit/static/static/js/{downloader.DM9KEOCw.js → downloader.C24skoDM.js} +1 -1
  101. streamlit/static/static/js/{es6.FqM62T4b.js → es6.DHkvCKPh.js} +2 -2
  102. streamlit/static/static/js/{iframeResizer.contentWindow.s2B09mw2.js → iframeResizer.contentWindow.2ckQaC2c.js} +1 -1
  103. streamlit/static/static/js/index.0dGwl8CJ.js +1 -0
  104. streamlit/static/static/js/index.B5A28NpR.js +1 -0
  105. streamlit/static/static/js/{index.B9FiDQ3U.js → index.B5EFweZ4.js} +1 -1
  106. streamlit/static/static/js/{index.DkGCnTMe.js → index.BAafqHfB.js} +1 -1
  107. streamlit/static/static/js/{index.BMXmhMlZ.js → index.BHTbGZPQ.js} +1 -1
  108. streamlit/static/static/js/{index.CpDFZQ4Y.js → index.BNXtQAj4.js} +1 -1
  109. streamlit/static/static/js/index.BRhKaVdO.js +1 -0
  110. streamlit/static/static/js/index.BSOiJVQd.js +2 -0
  111. streamlit/static/static/js/{index.BoMRR3tN.js → index.BVgTQbOJ.js} +1 -1
  112. streamlit/static/static/js/{index.Cwtbhfaf.js → index.BflIniLm.js} +1 -1
  113. streamlit/static/static/js/{index.DMrO9G6A.js → index.BjeNtZIz.js} +1 -1
  114. streamlit/static/static/js/{index.C2qCX1Lh.js → index.By-NmdnB.js} +151 -151
  115. streamlit/static/static/js/{index.b9kK7Vzl.js → index.CIoOEhZ2.js} +1 -1
  116. streamlit/static/static/js/{index.CEKMSkSh.js → index.CRCdonis.js} +36 -36
  117. streamlit/static/static/js/{index.T5LKPcND.js → index.CRxaBCJ7.js} +1 -1
  118. streamlit/static/static/js/{index.CeiCniCg.js → index.CU-pbYVN.js} +1 -1
  119. streamlit/static/static/js/{index.BVA8TXNT.js → index.CUsk52t2.js} +1 -1
  120. streamlit/static/static/js/{index.CH9XN_-G.js → index.CVO14oQG.js} +2 -2
  121. streamlit/static/static/js/index.CXFuA6J-.js +1 -0
  122. streamlit/static/static/js/{index.DQi04JYE.js → index.C_dd5q7u.js} +1 -1
  123. streamlit/static/static/js/{index.DTi8Lw0k.js → index.CjWUnKIN.js} +1 -1
  124. streamlit/static/static/js/{index.DG8IxVeM.js → index.CkTL9bAR.js} +2 -2
  125. streamlit/static/static/js/{index.D9FvPPrI.js → index.CsbhsAPy.js} +1 -1
  126. streamlit/static/static/js/{index.R0peMEpV.js → index.CtCnBUtk.js} +1 -1
  127. streamlit/static/static/js/{index.CP2PmB93.js → index.CwuKadAX.js} +1 -1
  128. streamlit/static/static/js/{index.BFqpCk2P.js → index.D0R7Xh4Z.js} +1 -1
  129. streamlit/static/static/js/{index.DSDkXosb.js → index.D2D75EDw.js} +2 -2
  130. streamlit/static/static/js/{index.BsjuUMyW.js → index.D4eMiZ1F.js} +1 -1
  131. streamlit/static/static/js/{index.BDTYk2an.js → index.D7SCC3z9.js} +1 -1
  132. streamlit/static/static/js/{index.JTeVe9GQ.js → index.DZiilxEt.js} +1 -1
  133. streamlit/static/static/js/{index.BY7-qCf5.js → index.Dvr1cEJS.js} +1 -1
  134. streamlit/static/static/js/index.JtIlC6Uq.js +1 -0
  135. streamlit/static/static/js/index.fz_c3Xh_.js +1 -0
  136. streamlit/static/static/js/{index.CqaahZPf.js → index.gFjPlsMT.js} +1 -1
  137. streamlit/static/static/js/{index.0pkoyBcb.js → index.jCJYMVED.js} +1 -1
  138. streamlit/static/static/js/{index.DWaB7Scf.js → index.xldt56AE.js} +1 -1
  139. streamlit/static/static/js/{index.CyE1OdOj.js → index.yzoj_DuM.js} +1 -1
  140. streamlit/static/static/js/{input.DMOGBelK.js → input.BP6LX_Bg.js} +1 -1
  141. streamlit/static/static/js/{memory.DmCktBGW.js → memory.E9x2ZYJv.js} +1 -1
  142. streamlit/static/static/js/{mergeWith.DeWTsJ5h.js → mergeWith.CZP2AaVS.js} +1 -1
  143. streamlit/static/static/js/{number-overlay-editor.DDFelcUP.js → number-overlay-editor.D-Kl79U_.js} +1 -1
  144. streamlit/static/static/js/{possibleConstructorReturn.CYJtAqB-.js → possibleConstructorReturn.P2ILVC_6.js} +1 -1
  145. streamlit/static/static/js/{sandbox.CfaU9Ih9.js → sandbox.DfzJIGMV.js} +1 -1
  146. streamlit/static/static/js/{textarea.7hWYKDw2.js → textarea.4PjzfDWF.js} +1 -1
  147. streamlit/static/static/js/{timepicker.DZsgZ9oE.js → timepicker.DMQdaNzO.js} +1 -1
  148. streamlit/static/static/js/{toConsumableArray.CqWB4Jry.js → toConsumableArray.BEdkbHYx.js} +1 -1
  149. streamlit/static/static/js/{uniqueId.DQ533D9O.js → uniqueId.CAs7ftHC.js} +1 -1
  150. streamlit/static/static/js/{useBasicWidgetState.-99xbU_o.js → useBasicWidgetState.Cedp0V76.js} +1 -1
  151. streamlit/static/static/js/{useOnInputChange.B4G2Q7Bu.js → useOnInputChange.CvRKHHKx.js} +1 -1
  152. streamlit/static/static/js/{withFullScreenWrapper.BJQZ2aNc.js → withFullScreenWrapper.BbmjZAzW.js} +1 -1
  153. streamlit/string_util.py +6 -7
  154. streamlit/temporary_directory.py +12 -3
  155. streamlit/testing/v1/app_test.py +11 -6
  156. streamlit/testing/v1/element_tree.py +134 -158
  157. streamlit/testing/v1/local_script_runner.py +5 -5
  158. streamlit/testing/v1/util.py +11 -4
  159. streamlit/type_util.py +3 -4
  160. streamlit/user_info.py +3 -2
  161. streamlit/util.py +1 -1
  162. streamlit/watcher/event_based_path_watcher.py +1 -1
  163. streamlit/watcher/folder_black_list.py +1 -1
  164. streamlit/watcher/local_sources_watcher.py +5 -5
  165. streamlit/watcher/path_watcher.py +1 -1
  166. streamlit/web/cli.py +12 -11
  167. streamlit/web/server/browser_websocket_handler.py +1 -1
  168. streamlit/web/server/component_request_handler.py +1 -1
  169. streamlit/web/server/media_file_handler.py +2 -1
  170. streamlit/web/server/oauth_authlib_routes.py +2 -2
  171. streamlit/web/server/oidc_mixin.py +13 -6
  172. streamlit/web/server/routes.py +3 -3
  173. streamlit/web/server/server.py +1 -1
  174. streamlit/web/server/server_util.py +7 -6
  175. streamlit/web/server/upload_file_request_handler.py +5 -5
  176. {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/METADATA +1 -1
  177. {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/RECORD +181 -177
  178. {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/WHEEL +1 -1
  179. streamlit/static/static/js/index.CCD4LJ9Q.js +0 -1
  180. streamlit/static/static/js/index.CbLZDRQu.js +0 -1
  181. streamlit/static/static/js/index.D9qEk5xd.js +0 -1
  182. streamlit/static/static/js/index.DTXSsTgK.js +0 -1
  183. streamlit/static/static/js/index.DqVjOqxm.js +0 -1
  184. streamlit/static/static/js/index.RHbaxsqm.js +0 -1
  185. streamlit/static/static/js/index.hT9gkW3a.js +0 -2
  186. {streamlit_nightly-1.45.1.dev20250508.data → streamlit_nightly-1.45.1.dev20250509.data}/scripts/streamlit.cmd +0 -0
  187. {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/entry_points.txt +0 -0
  188. {streamlit_nightly-1.45.1.dev20250508.dist-info → streamlit_nightly-1.45.1.dev20250509.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.C2qCX1Lh.js";import{_ as ls,a as qU,C as ZU}from"./toConsumableArray.CqWB4Jry.js";import{a as Wu,b as Ju,_ as qx,c as dA,d as Zx}from"./possibleConstructorReturn.CYJtAqB-.js";import{a as QU,T as e5}from"./Toolbar.CAYIzVZk.js";import{E as GO,w as t5}from"./withFullScreenWrapper.BJQZ2aNc.js";import{u as r5}from"./useBasicWidgetState.-99xbU_o.js";import{u as n5,s as i5}from"./threshold.DjX0wlsa.js";import"./FormClearHelper.D5PbW8FI.js";import"./value.CgPGBV_l.js";function s5(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const yu={};function Hm(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const Qx=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hB&&parseFloat(hB[1]);const Pu=globalThis,Ea=globalThis.process||{},o5=globalThis.navigator||{};function VO(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function rl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||VO()}function a5(r){return rl()?VO()?"Electron":(o5.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const iy="4.1.0";function c5(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let l5=class{constructor(e,t,n="sessionStorage"){this.storage=c5(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function u5(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function f5(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var jm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(jm||(jm={}));const h5=10;function dB(r){return typeof r!="string"?r:(r=r.toUpperCase(),jm[r]||jm.WHITE)}function d5(r,e,t){return!rl&&typeof r=="string"&&(e&&(r=`\x1B[${dB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${dB(t)+h5}m${r}\x1B[49m`)),r}function A5(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function ew(r,e){if(!r)throw new Error("Assertion failed")}function id(){var e,t,n;let r;if(rl()&&Pu.performance)r=(t=(e=Pu==null?void 0:Pu.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Ea){const i=(n=Ea==null?void 0:Ea.hrtime)==null?void 0:n.call(Ea);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const sd={debug:rl()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p5={enabled:!0,level:0};function od(){}const AB={},pB={once:!0};let HO=class{constructor({id:e}={id:""}){this.VERSION=iy,this._startTs=id(),this._deltaTs=id(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new l5(`__probe-${this.id}__`,p5),this.timeStamp(`${this.id} started`),A5(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((id()-this._startTs).toPrecision(10))}getDelta(){return Number((id()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,sd.warn,arguments,pB)}error(e){return this._getLogFunction(0,e,sd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,sd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,sd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,sd.debug||sd.info,arguments,pB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||od,n&&[n],{tag:m5(t)}):od}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||od)}group(e,t,n={collapsed:!1}){const i=gB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||od)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jO(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=gB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,ew(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=id();const s=o.tag||o.message;if(o.once&&s)if(!AB[s])AB[s]=id();else return od;return t=g5(this.id,o.message,o),n.bind(console,t,...o.args)}return od}};HO.VERSION=iy;function jO(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return ew(Number.isFinite(e)&&e>=0),e}function gB(r){const{logLevel:e,message:t}=r;r.logLevel=jO(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return ew(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function g5(r,e,t){if(typeof e=="string"){const n=t.time?f5(u5(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=d5(e,t.color,t.background)}return e}function m5(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}function _5(r,e){return $O(r||{},e)}function $O(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?n[i]=$O(n[i]||{},e[i],t+1):n[i]=e[i];return n}const y5="latest";function v5(){var r;return(r=globalThis._loadersgl_)!=null&&r.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const b5=v5();function ku(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const $f=typeof process!="object"||String(process)!=="[object process]"||process.browser,x5=typeof window<"u"&&typeof window.orientation<"u",mB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);mB&&parseFloat(mB[1]);let w5=class{constructor(e,t){V(this,"name");V(this,"workerThread");V(this,"isRunning",!0);V(this,"result");V(this,"_resolve",()=>{});V(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){ku(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){ku(this.isRunning),this.isRunning=!1,this._reject(e)}},Lv=class{terminate(){}};const Nv=new Map;function C5(r){ku(r.source&&!r.url||!r.source&&r.url);let e=Nv.get(r.source||r.url);return e||(r.url&&(e=E5(r.url),Nv.set(r.url,e)),r.source&&(e=WO(r.source),Nv.set(r.source,e))),ku(e),e}function E5(r){if(!r.startsWith("http"))return r;const e=T5(r);return WO(e)}function WO(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function T5(r){return`try {
1
+ var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.By-NmdnB.js";import{_ as ls,a as qU,C as ZU}from"./toConsumableArray.BEdkbHYx.js";import{a as Wu,b as Ju,_ as qx,c as dA,d as Zx}from"./possibleConstructorReturn.P2ILVC_6.js";import{a as QU,T as e5}from"./Toolbar.LKdyvP0u.js";import{E as GO,w as t5}from"./withFullScreenWrapper.BbmjZAzW.js";import{u as r5}from"./useBasicWidgetState.Cedp0V76.js";import{u as n5,s as i5}from"./threshold.DjX0wlsa.js";import"./FormClearHelper.CVNTT-bJ.js";import"./value.CgPGBV_l.js";function s5(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const yu={};function Hm(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const Qx=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hB&&parseFloat(hB[1]);const Pu=globalThis,Ea=globalThis.process||{},o5=globalThis.navigator||{};function VO(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function rl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||VO()}function a5(r){return rl()?VO()?"Electron":(o5.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const iy="4.1.0";function c5(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let l5=class{constructor(e,t,n="sessionStorage"){this.storage=c5(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function u5(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function f5(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var jm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(jm||(jm={}));const h5=10;function dB(r){return typeof r!="string"?r:(r=r.toUpperCase(),jm[r]||jm.WHITE)}function d5(r,e,t){return!rl&&typeof r=="string"&&(e&&(r=`\x1B[${dB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${dB(t)+h5}m${r}\x1B[49m`)),r}function A5(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function ew(r,e){if(!r)throw new Error("Assertion failed")}function id(){var e,t,n;let r;if(rl()&&Pu.performance)r=(t=(e=Pu==null?void 0:Pu.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Ea){const i=(n=Ea==null?void 0:Ea.hrtime)==null?void 0:n.call(Ea);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const sd={debug:rl()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p5={enabled:!0,level:0};function od(){}const AB={},pB={once:!0};let HO=class{constructor({id:e}={id:""}){this.VERSION=iy,this._startTs=id(),this._deltaTs=id(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new l5(`__probe-${this.id}__`,p5),this.timeStamp(`${this.id} started`),A5(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((id()-this._startTs).toPrecision(10))}getDelta(){return Number((id()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,sd.warn,arguments,pB)}error(e){return this._getLogFunction(0,e,sd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,sd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,sd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,sd.debug||sd.info,arguments,pB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||od,n&&[n],{tag:m5(t)}):od}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||od)}group(e,t,n={collapsed:!1}){const i=gB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||od)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jO(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=gB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,ew(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=id();const s=o.tag||o.message;if(o.once&&s)if(!AB[s])AB[s]=id();else return od;return t=g5(this.id,o.message,o),n.bind(console,t,...o.args)}return od}};HO.VERSION=iy;function jO(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return ew(Number.isFinite(e)&&e>=0),e}function gB(r){const{logLevel:e,message:t}=r;r.logLevel=jO(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return ew(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function g5(r,e,t){if(typeof e=="string"){const n=t.time?f5(u5(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=d5(e,t.color,t.background)}return e}function m5(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}function _5(r,e){return $O(r||{},e)}function $O(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?n[i]=$O(n[i]||{},e[i],t+1):n[i]=e[i];return n}const y5="latest";function v5(){var r;return(r=globalThis._loadersgl_)!=null&&r.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const b5=v5();function ku(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const $f=typeof process!="object"||String(process)!=="[object process]"||process.browser,x5=typeof window<"u"&&typeof window.orientation<"u",mB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);mB&&parseFloat(mB[1]);let w5=class{constructor(e,t){V(this,"name");V(this,"workerThread");V(this,"isRunning",!0);V(this,"result");V(this,"_resolve",()=>{});V(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){ku(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){ku(this.isRunning),this.isRunning=!1,this._reject(e)}},Lv=class{terminate(){}};const Nv=new Map;function C5(r){ku(r.source&&!r.url||!r.source&&r.url);let e=Nv.get(r.source||r.url);return e||(r.url&&(e=E5(r.url),Nv.set(r.url,e)),r.source&&(e=WO(r.source),Nv.set(r.source,e))),ku(e),e}function E5(r){if(!r.startsWith("http"))return r;const e=T5(r);return WO(e)}function WO(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function T5(r){return`try {
2
2
  importScripts('${r}');
3
3
  } catch (error) {
4
4
  console.error(error);
@@ -5363,4 +5363,4 @@ fragColor.g = outTexture.r / max(1.0, outTexture.a);
5363
5363
  float textureSize;
5364
5364
  } maxWeight;
5365
5365
  `,uniformTypes:{textureSize:"f32"}},xEe=2,K1={format:"rgba8unorm",mipmaps:!1,sampler:{minFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}},CO=[0,0],wEe={SUM:0,MEAN:1},CEe={getPosition:{type:"accessor",value:r=>r.position},getWeight:{type:"accessor",value:1},intensity:{type:"number",min:0,value:1},radiusPixels:{type:"number",min:1,max:100,value:50},colorRange:tv,threshold:{type:"number",min:0,max:1,value:.05},colorDomain:{type:"array",value:null,optional:!0},aggregation:"SUM",weightsTextureSize:{type:"number",min:128,max:2048,value:2048},debounceTimeout:{type:"number",min:0,max:1e3,value:500}},EEe=["float32-renderable-webgl","texture-blend-float-webgl"],TEe={data:{props:["radiusPixels"]}};class UE extends a9{getShaders(e){let t=[Ss];return e.modules&&(t=[...t,...e.modules]),super.getShaders({...e,modules:t})}initializeState(){super.initializeAggregationLayer(TEe),this.setState({colorDomain:CO}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState(e){super.updateState(e),this._updateHeatmapState(e)}_updateHeatmapState(e){const{props:t,oldProps:n}=e,i=this._getChangeFlags(e);(i.dataChanged||i.viewportChanged)&&(i.boundsChanged=this._updateBounds(i.dataChanged),this._updateTextureRenderingBounds()),i.dataChanged||i.boundsChanged?(clearTimeout(this.state.updateTimer),this.setState({isWeightMapDirty:!0})):i.viewportZoomChanged&&this._debouncedUpdateWeightmap(),t.colorRange!==n.colorRange&&this._updateColorTexture(e),this.state.isWeightMapDirty&&this._updateWeightmap(),this.setState({zoom:e.context.viewport.zoom})}renderLayers(){const{weightsTexture:e,triPositionBuffer:t,triTexCoordBuffer:n,maxWeightsTexture:i,colorTexture:o,colorDomain:s}=this.state,{updateTriggers:c,intensity:f,threshold:_,aggregation:b}=this.props,T=this.getSubLayerClass("triangle",o9);return new T(this.getSubLayerProps({id:"triangle-layer",updateTriggers:c}),{coordinateSystem:Jr.DEFAULT,data:{attributes:{positions:t,texCoords:n}},vertexCount:4,maxTexture:i,colorTexture:o,aggregationMode:wEe[b]||0,weightsTexture:e,intensity:f,threshold:_,colorDomain:s})}finalizeState(e){super.finalizeState(e);const{weightsTransform:t,weightsTexture:n,maxWeightTransform:i,maxWeightsTexture:o,triPositionBuffer:s,triTexCoordBuffer:c,colorTexture:f,updateTimer:_}=this.state;t==null||t.destroy(),n==null||n.destroy(),i==null||i.destroy(),o==null||o.destroy(),s==null||s.destroy(),c==null||c.destroy(),f==null||f.destroy(),_&&clearTimeout(_)}_getAttributeManager(){return new dy(this.context.device,{id:this.props.id,stats:this.context.stats})}_getChangeFlags(e){const t={},{dimensions:n}=this.state;t.dataChanged=this.isAttributeChanged()&&"attribute changed"||this.isAggregationDirty(e,{compareAll:!0,dimension:n.data})&&"aggregation is dirty",t.viewportChanged=e.changeFlags.viewportChanged;const{zoom:i}=this.state;return(!e.context.viewport||e.context.viewport.zoom!==i)&&(t.viewportZoomChanged=!0),t}_createTextures(){const{textureSize:e,format:t}=this.state;this.setState({weightsTexture:this.context.device.createTexture({...K1,width:e,height:e,format:t}),maxWeightsTexture:this.context.device.createTexture({...K1,width:1,height:1,format:t})})}_setupAttributes(){this.getAttributeManager().add({positions:{size:3,type:"float64",accessor:"getPosition"},weights:{size:1,accessor:"getWeight"}}),this.setState({positionAttributeName:"positions"})}_setupTextureParams(){const{device:e}=this.context,{weightsTextureSize:t}=this.props,n=Math.min(t,e.limits.maxTextureDimension2D),i=EEe.every(c=>e.features.has(c)),o=i?"rgba32float":"rgba8unorm",s=i?1:1/255;this.setState({textureSize:n,format:o,weightsScale:s}),i||$r.warn(`HeatmapLayer: ${this.id} rendering to float texture not supported, falling back to low precision format`)()}_createWeightsTransform(e){let{weightsTransform:t}=this.state;const{weightsTexture:n}=this.state,i=this.getAttributeManager();t==null||t.destroy(),t=new YS(this.context.device,{id:`${this.id}-weights-transform`,bufferLayout:i.getBufferLayouts(),vertexCount:1,targetTexture:n,parameters:{depthWriteEnabled:!1,blendColorOperation:"add",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"},topology:"point-list",...e,modules:[...e.modules,vEe]}),this.setState({weightsTransform:t})}_setupResources(){this._createTextures();const{device:e}=this.context,{textureSize:t,weightsTexture:n,maxWeightsTexture:i}=this.state,o=this.getShaders({vs:xO,fs:wO});this._createWeightsTransform(o);const s=this.getShaders({vs:mEe,fs:_Ee,modules:[bEe]}),c=new YS(e,{id:`${this.id}-max-weights-transform`,targetTexture:i,...s,vertexCount:t*t,topology:"point-list",parameters:{depthWriteEnabled:!1,blendColorOperation:"max",blendAlphaOperation:"max",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"}}),f={inTexture:n,textureSize:t};c.model.shaderInputs.setProps({maxWeight:f}),this.setState({weightsTexture:n,maxWeightsTexture:i,maxWeightTransform:c,zoom:null,triPositionBuffer:e.createBuffer({byteLength:48}),triTexCoordBuffer:e.createBuffer({byteLength:48})})}updateShaders(e){this._createWeightsTransform({vs:xO,fs:wO,...e})}_updateMaxWeightValue(){const{maxWeightTransform:e}=this.state;e.run({parameters:{viewport:[0,0,1,1]},clearColor:[0,0,0,0]})}_updateBounds(e=!1){const{viewport:t}=this.context,n=[t.unproject([0,0]),t.unproject([t.width,0]),t.unproject([0,t.height]),t.unproject([t.width,t.height])].map(c=>c.map(Math.fround)),i=cEe(n),o={visibleWorldBounds:i,viewportCorners:n};let s=!1;if(e||!this.state.worldBounds||!lEe(this.state.worldBounds,i)){const c=this._worldToCommonBounds(i),f=this._commonToWorldBounds(c);this.props.coordinateSystem===Jr.LNGLAT&&(f[1]=Math.max(f[1],-85.051129),f[3]=Math.min(f[3],85.051129),f[0]=Math.max(f[0],-360),f[2]=Math.min(f[2],360));const _=this._worldToCommonBounds(f);o.worldBounds=f,o.normalizedCommonBounds=_,s=!0}return this.setState(o),s}_updateTextureRenderingBounds(){const{triPositionBuffer:e,triTexCoordBuffer:t,normalizedCommonBounds:n,viewportCorners:i}=this.state,{viewport:o}=this.context;e.write(vO(i,3));const s=i.map(c=>fEe(o.projectPosition(c),n));t.write(vO(s,2))}_updateColorTexture(e){const{colorRange:t}=e.props;let{colorTexture:n}=this.state;const i=t9(t,!1,Uint8Array);n&&(n==null?void 0:n.width)===t.length?n.setTexture2DData({data:i}):(n==null||n.destroy(),n=this.context.device.createTexture({...K1,data:i,width:t.length,height:1})),this.setState({colorTexture:n})}_updateWeightmap(){const{radiusPixels:e,colorDomain:t,aggregation:n}=this.props,{worldBounds:i,textureSize:o,weightsScale:s,weightsTexture:c}=this.state,f=this.state.weightsTransform;this.state.isWeightMapDirty=!1;const _=this._worldToCommonBounds(i,{useLayerCoordinateSystem:!0});if(t&&n==="SUM"){const{viewport:K}=this.context,fe=K.distanceScales.metersPerUnit[2]*(_[2]-_[0])/o;this.state.colorDomain=t.map(Z=>Z*fe*s)}else this.state.colorDomain=t||CO;const T=this.getAttributeManager().getAttributes(),S=this.getModuleSettings();this._setModelAttributes(f.model,T),f.model.setVertexCount(this.getNumInstances());const D={radiusPixels:e,commonBounds:_,textureWidth:o,weightsScale:s,weightsTexture:c},{viewport:k,devicePixelRatio:G,coordinateSystem:W,coordinateOrigin:z}=S,{modelMatrix:j}=this.props;f.model.shaderInputs.setProps({project:{viewport:k,devicePixelRatio:G,modelMatrix:j,coordinateSystem:W,coordinateOrigin:z},weight:D}),f.run({parameters:{viewport:[0,0,o,o]},clearColor:[0,0,0,0]}),this._updateMaxWeightValue()}_debouncedUpdateWeightmap(e=!1){let{updateTimer:t}=this.state;const{debounceTimeout:n}=this.props;e?(t=null,this._updateBounds(!0),this._updateTextureRenderingBounds(),this.setState({isWeightMapDirty:!0})):(this.setState({isWeightMapDirty:!1}),clearTimeout(t),t=setTimeout(this._debouncedUpdateWeightmap.bind(this,!0),n)),this.setState({updateTimer:t})}_worldToCommonBounds(e,t={}){const{useLayerCoordinateSystem:n=!1}=t,[i,o,s,c]=e,{viewport:f}=this.context,{textureSize:_}=this.state,{coordinateSystem:b}=this.props,T=n&&(b===Jr.LNGLAT_OFFSETS||b===Jr.METER_OFFSETS),S=T?f.projectPosition(this.props.coordinateOrigin):[0,0],D=_*xEe/f.scale;let k,G;return n&&!T?(k=this.projectPosition([i,o,0]),G=this.projectPosition([s,c,0])):(k=f.projectPosition([i,o,0]),G=f.projectPosition([s,c,0])),uEe([k[0]-S[0],k[1]-S[1],G[0]-S[0],G[1]-S[1]],D,D)}_commonToWorldBounds(e){const[t,n,i,o]=e,{viewport:s}=this.context,c=s.unprojectPosition([t,n]),f=s.unprojectPosition([i,o]);return c.slice(0,2).concat(f.slice(0,2))}}UE.layerName="HeatmapLayer";UE.defaultProps=CEe;const BEe=Object.freeze(Object.defineProperty({__proto__:null,CPUAggregator:kA,ContourLayer:NE,GridLayer:kE,HeatmapLayer:UE,HexagonLayer:LE,ScreenGridLayer:OE,WebGLAggregator:Pa,_AggregationLayer:UA},Symbol.toStringTag,{value:"Module"})),SEe={ClusterTileLayer:yE,H3TileLayer:vE,HeatmapTileLayer:xE,PointLabelLayer:ev,QuadbinTileLayer:Qy,RasterTileLayer:EE,VectorTileLayer:BE};function Xx(r,e=""){if(!r)throw new Error(`JSON conversion error ${e}`)}function IEe(r,e){const t=PEe(e);let n=r;for(const i of t)n=MEe(n)?n[i]:void 0;return n}function MEe(r){return r!==null&&typeof r=="object"}const EO={};function PEe(r){if(typeof r=="string"){let e=EO[r];return e||(e=r.split("."),EO[r]=e),e}return Array.isArray(r)?r:[r]}var bm={exports:{}},TO;function REe(){return TO||(TO=1,function(r,e){(function(t){var n="Compound",i="Identifier",o="MemberExpression",s="Literal",c="ThisExpression",f="CallExpression",_="UnaryExpression",b="BinaryExpression",T="LogicalExpression",S="ConditionalExpression",D="ArrayExpression",k=46,G=44,W=39,z=34,j=40,K=41,fe=91,Z=93,ae=63,Be=59,Ne=58,de=function(Tt,tt){var lr=new Error(Tt+" at character "+tt);throw lr.index=tt,lr.description=Tt,lr},_e=!0,pe={"-":_e,"!":_e,"~":_e,"+":_e},J={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},te=function(Tt){var tt=0,lr;for(var Jt in Tt)(lr=Jt.length)>tt&&Tt.hasOwnProperty(Jt)&&(tt=lr);return tt},be=te(pe),Qe=te(J),Ee={true:!0,false:!1,null:null},De="this",Ge=function(Tt){return J[Tt]||0},et=function(Tt,tt,lr){var Jt=Tt==="||"||Tt==="&&"?T:b;return{type:Jt,operator:Tt,left:tt,right:lr}},it=function(Tt){return Tt>=48&&Tt<=57},rt=function(Tt){return Tt===36||Tt===95||Tt>=65&&Tt<=90||Tt>=97&&Tt<=122||Tt>=128&&!J[String.fromCharCode(Tt)]},ct=function(Tt){return Tt===36||Tt===95||Tt>=65&&Tt<=90||Tt>=97&&Tt<=122||Tt>=48&&Tt<=57||Tt>=128&&!J[String.fromCharCode(Tt)]},mt=function(Tt){for(var tt=0,lr=Tt.charAt,Jt=Tt.charCodeAt,Wt=function(Ut){return lr.call(Tt,Ut)},Lt=function(Ut){return Jt.call(Tt,Ut)},sr=Tt.length,qr=function(){for(var Ut=Lt(tt);Ut===32||Ut===9||Ut===10||Ut===13;)Ut=Lt(++tt)},Er=function(){var Ut=Mn(),Ar,Tr;if(qr(),Lt(tt)===ae){if(tt++,Ar=Er(),Ar||de("Expected expression",tt),qr(),Lt(tt)===Ne)return tt++,Tr=Er(),Tr||de("Expected expression",tt),{type:S,test:Ut,consequent:Ar,alternate:Tr};de("Expected :",tt)}else return Ut},pr=function(){qr();for(var Ut=Tt.substr(tt,Qe),Ar=Ut.length;Ar>0;){if(J.hasOwnProperty(Ut)&&(!rt(Lt(tt))||tt+Ut.length<Tt.length&&!ct(Lt(tt+Ut.length))))return tt+=Ar,Ut;Ut=Ut.substr(0,--Ar)}return!1},Mn=function(){var Ut,Ar,Tr,Qr,ui,Pe,Dt,Vt,or;if(Pe=hr(),Ar=pr(),!Ar)return Pe;for(ui={value:Ar,prec:Ge(Ar)},Dt=hr(),Dt||de("Expected expression after "+Ar,tt),Qr=[Pe,ui,Dt];(Ar=pr())&&(Tr=Ge(Ar),Tr!==0);){for(ui={value:Ar,prec:Tr},or=Ar;Qr.length>2&&Tr<=Qr[Qr.length-2].prec;)Dt=Qr.pop(),Ar=Qr.pop().value,Pe=Qr.pop(),Ut=et(Ar,Pe,Dt),Qr.push(Ut);Ut=hr(),Ut||de("Expected expression after "+or,tt),Qr.push(ui,Ut)}for(Vt=Qr.length-1,Ut=Qr[Vt];Vt>1;)Ut=et(Qr[Vt-1].value,Qr[Vt-2],Ut),Vt-=2;return Ut},hr=function(){var Ut,Ar,Tr;if(qr(),Ut=Lt(tt),it(Ut)||Ut===k)return dr();if(Ut===W||Ut===z)return Zr();if(Ut===fe)return Xn();for(Ar=Tt.substr(tt,be),Tr=Ar.length;Tr>0;){if(pe.hasOwnProperty(Ar)&&(!rt(Lt(tt))||tt+Ar.length<Tt.length&&!ct(Lt(tt+Ar.length))))return tt+=Tr,{type:_,operator:Ar,argument:hr(),prefix:!0};Ar=Ar.substr(0,--Tr)}return rt(Ut)||Ut===j?$n():!1},dr=function(){for(var Ut="",Ar,Tr;it(Lt(tt));)Ut+=Wt(tt++);if(Lt(tt)===k)for(Ut+=Wt(tt++);it(Lt(tt));)Ut+=Wt(tt++);if(Ar=Wt(tt),Ar==="e"||Ar==="E"){for(Ut+=Wt(tt++),Ar=Wt(tt),(Ar==="+"||Ar==="-")&&(Ut+=Wt(tt++));it(Lt(tt));)Ut+=Wt(tt++);it(Lt(tt-1))||de("Expected exponent ("+Ut+Wt(tt)+")",tt)}return Tr=Lt(tt),rt(Tr)?de("Variable names cannot start with a number ("+Ut+Wt(tt)+")",tt):Tr===k&&de("Unexpected period",tt),{type:s,value:parseFloat(Ut),raw:Ut}},Zr=function(){for(var Ut="",Ar=Wt(tt++),Tr=!1,Qr;tt<sr;)if(Qr=Wt(tt++),Qr===Ar){Tr=!0;break}else if(Qr==="\\")switch(Qr=Wt(tt++),Qr){case"n":Ut+=`
5366
- `;break;case"r":Ut+="\r";break;case"t":Ut+=" ";break;case"b":Ut+="\b";break;case"f":Ut+="\f";break;case"v":Ut+="\v";break;default:Ut+=Qr}else Ut+=Qr;return Tr||de('Unclosed quote after "'+Ut+'"',tt),{type:s,value:Ut,raw:Ar+Ut+Ar}},Sr=function(){var Ut=Lt(tt),Ar=tt,Tr;for(rt(Ut)?tt++:de("Unexpected "+Wt(tt),tt);tt<sr&&(Ut=Lt(tt),ct(Ut));)tt++;return Tr=Tt.slice(Ar,tt),Ee.hasOwnProperty(Tr)?{type:s,value:Ee[Tr],raw:Tr}:Tr===De?{type:c}:{type:i,name:Tr}},ei=function(Ut){for(var Ar,Tr=[],Qr,ui=!1,Pe=0;tt<sr;)if(qr(),Ar=Lt(tt),Ar===Ut){ui=!0,tt++,Ut===K&&Pe&&Pe>=Tr.length&&de("Unexpected token "+String.fromCharCode(Ut),tt);break}else if(Ar===G){if(tt++,Pe++,Pe!==Tr.length){if(Ut===K)de("Unexpected token ,",tt);else if(Ut===Z)for(var Dt=Tr.length;Dt<Pe;Dt++)Tr.push(null)}}else Qr=Er(),(!Qr||Qr.type===n)&&de("Expected comma",tt),Tr.push(Qr);return ui||de("Expected "+String.fromCharCode(Ut),tt),Tr},$n=function(){var Ut,Ar;for(Ut=Lt(tt),Ut===j?Ar=un():Ar=Sr(),qr(),Ut=Lt(tt);Ut===k||Ut===fe||Ut===j;)tt++,Ut===k?(qr(),Ar={type:o,computed:!1,object:Ar,property:Sr()}):Ut===fe?(Ar={type:o,computed:!0,object:Ar,property:Er()},qr(),Ut=Lt(tt),Ut!==Z&&de("Unclosed [",tt),tt++):Ut===j&&(Ar={type:f,arguments:ei(K),callee:Ar}),qr(),Ut=Lt(tt);return Ar},un=function(){tt++;var Ut=Er();if(qr(),Lt(tt)===K)return tt++,Ut;de("Unclosed (",tt)},Xn=function(){return tt++,{type:D,elements:ei(Z)}},kn=[],bn,Wn;tt<sr;)bn=Lt(tt),bn===Be||bn===G?tt++:(Wn=Er())?kn.push(Wn):tt<sr&&de('Unexpected "'+Wt(tt)+'"',tt);return kn.length===1?kn[0]:{type:n,body:kn}};mt.version="0.3.5",mt.toString=function(){return"JavaScript Expression Parser (JSEP) v"+mt.version},mt.addUnaryOp=function(Tt){return be=Math.max(Tt.length,be),pe[Tt]=_e,this},mt.addBinaryOp=function(Tt,tt){return Qe=Math.max(Tt.length,Qe),J[Tt]=tt,this},mt.addLiteral=function(Tt,tt){return Ee[Tt]=tt,this},mt.removeUnaryOp=function(Tt){return delete pe[Tt],Tt.length===be&&(be=te(pe)),this},mt.removeAllUnaryOps=function(){return pe={},be=0,this},mt.removeBinaryOp=function(Tt){return delete J[Tt],Tt.length===Qe&&(Qe=te(J)),this},mt.removeAllBinaryOps=function(){return J={},Qe=0,this},mt.removeLiteral=function(Tt){return delete Ee[Tt],this},mt.removeAllLiterals=function(){return Ee={},this},r.exports?e=r.exports=mt:e.parse=mt})()}(bm,bm.exports)),bm.exports}var FEe=REe();const OEe=ih(FEe),BO={"||":(r,e)=>r||e,"&&":(r,e)=>r&&e,"|":(r,e)=>r|e,"^":(r,e)=>r^e,"&":(r,e)=>r&e,"==":(r,e)=>r==e,"!=":(r,e)=>r!=e,"===":(r,e)=>r===e,"!==":(r,e)=>r!==e,"<":(r,e)=>r<e,">":(r,e)=>r>e,"<=":(r,e)=>r<=e,">=":(r,e)=>r>=e,"<<":(r,e)=>r<<e,">>":(r,e)=>r>>e,">>>":(r,e)=>r>>>e,"+":(r,e)=>r+e,"-":(r,e)=>r-e,"*":(r,e)=>r*e,"/":(r,e)=>r/e,"%":(r,e)=>r%e},DEe={"-":r=>-r,"+":r=>+r,"~":r=>~r,"!":r=>!r};function SO(r,e){return r.map(function(t){return Vs(t,e)})}function IO(r,e){const t=Vs(r.object,e);let n;if(r.computed?n=Vs(r.property,e):n=r.property.name,/^__proto__|prototype|constructor$/.test(n))throw Error(`Access to member "${n}" disallowed.`);return[t,t[n]]}function Vs(r,e){const t=r;switch(t.type){case"ArrayExpression":return SO(t.elements,e);case"BinaryExpression":return BO[t.operator](Vs(t.left,e),Vs(t.right,e));case"CallExpression":let n,i,o;return t.callee.type==="MemberExpression"?(o=IO(t.callee,e),n=o[0],i=o[1]):i=Vs(t.callee,e),typeof i!="function"?void 0:i.apply(n,SO(t.arguments,e));case"ConditionalExpression":return Vs(t.test,e)?Vs(t.consequent,e):Vs(t.alternate,e);case"Identifier":return e[t.name];case"Literal":return t.value;case"LogicalExpression":return t.operator==="||"?Vs(t.left,e)||Vs(t.right,e):t.operator==="&&"?Vs(t.left,e)&&Vs(t.right,e):BO[t.operator](Vs(t.left,e),Vs(t.right,e));case"MemberExpression":return IO(t,e)[1];case"ThisExpression":return e;case"UnaryExpression":return DEe[t.operator](Vs(t.argument,e));default:return}}const Y1={"-":r=>r};function c9(r,e){if(r in Y1)return Y1[r];let t;const n=OEe(r);return n.type==="Identifier"?t=i=>IEe(i,r):(Kx(n,i=>{if(i.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),t=i=>Vs(n,i)),Y1[r]=t,t}function Kx(r,e){if(Array.isArray(r))r.forEach(t=>Kx(t,e));else if(r&&typeof r=="object"){r.type&&e(r);for(const t in r)Kx(r[t],e)}}const V_="@@=",MO="@@#",LEe="@@type",l9="@@function",PO=r=>r&&typeof r=="object";class Yx{constructor(...e){this.typeKey=LEe,this.functionKey=l9,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=c9,this.preProcessClassProps=(t,n)=>n,this.postProcessConvertedJson=t=>t;for(const t of e)this.merge(t)}merge(e){for(const t in e)switch(t){case"layers":case"views":Object.assign(this.classes,e[t]);break;default:if(t in this){const n=e[t];this[t]=PO(this[t])?Object.assign(this[t],n):n}}}validate(e){return Xx(!this.typeKey||typeof this.typeKey=="string"),Xx(PO(this.classes)),!0}}function NEe(r){return typeof r=="string"&&r.startsWith(V_)}function kEe(r){return r.replace(V_,"")}function u9(r,e){const t={};for(const n in r){let i=r[n];NEe(i)&&(i=kEe(i),i=c9(i)),t[n]=i}return t}function UEe(r,e,t){const n=t.classes[r],i=t.reactComponents[r];if(!n&&!i){const{log:o}=t;if(o){const s=JSON.stringify(e,null,0).slice(0,40);o.warn(`JSON converter: No registered class of type ${r}(${s}...) `)}return null}return n?zEe(n,e,t):GEe(i,e,t)}function zEe(r,e,t){return t.preProcessClassProps&&(e=t.preProcessClassProps(r,e,t)),e=u9(e),new r(e)}function GEe(r,e,t){const{React:n}=t,{children:i=[]}=e;return delete e.children,t.preProcessClassProps&&(e=t.preProcessClassProps(r,e,t)),e=u9(e),n.createElement(r,e,i)}function VEe(r,e,t){const n=t.functions[r];if(!n){const{log:i}=t;if(i){const o=JSON.stringify(e,null,0).slice(0,40);i.warn(`JSON converter: No registered function ${r}(${o}...) `)}return null}return n(e)}function HEe(r){return typeof r=="string"?JSON.parse(r):r}const zE=r=>r&&typeof r=="object";class jEe{constructor(e){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(e)}finalize(){}setProps(e){"configuration"in e&&(this.configuration=e.configuration instanceof Yx?e.configuration:new Yx(e.configuration)),"onJSONChange"in e&&(this.onJSONChange=e.onJSONChange)}mergeConfiguration(e){this.configuration.merge(e)}convert(e){if(!e||e===this.json)return this.convertedJson;this.json=e;const t=HEe(e);let n=$Ee(t,this.configuration);return n=this.configuration.postProcessConvertedJson(n),this.convertedJson=n,n}convertJson(e){return this.convert(e)}}function $Ee(r,e){return e=new Yx(e),GE(r,"",e)}function GE(r,e,t){return Array.isArray(r)?r.map((n,i)=>GE(n,String(i),t)):WEe(r,t)?JEe(r,t):zE(r)?l9 in r?XEe(r,t):VE(r,t):typeof r=="string"?KEe(r,e,t):r}function WEe(r,e){const{typeKey:t}=e;return zE(r)&&!!r[t]}function JEe(r,e){const{typeKey:t}=e,n=r[t];let i={...r};return delete i[t],i=VE(i,e),UEe(n,i,e)}function XEe(r,e){const{functionKey:t}=e,n=r[t];let i={...r};return delete i[t],i=VE(i,e),VEe(n,i,e)}function VE(r,e){Xx(zE(r));const t={};for(const n in r){const i=r[n];t[n]=GE(i,n,e)}return t}function KEe(r,e,t){if(r.startsWith(V_)&&t.convertFunction)return r=r.replace(V_,""),t.convertFunction(r,t);if(r.startsWith(MO)){if(r=r.replace(MO,""),t.constants[r])return t.constants[r];const[n,i]=r.split(".");return t.enumerations[n][i]}return r}const YEe={classes:{..._ue,...BEe,...d2e,...ame,...SEe},functions:{colorBins:Zwe,colorCategories:Qwe,colorContinuous:eCe}},f9=new jEe({configuration:YEe}),qEe={[Xy.layerName]:["getFillColor"],[Ny.layerName]:["getFillColor"],[sl.layerName]:["getFillColor"],[DA.layerName]:["getFillColor"],[Py.layerName]:["getFillColor"],[My.layerName]:["getFillColor"],[Oy.layerName]:["getColor"],[Mg.layerName]:["getTargetColor","getSourceColor"],[il.layerName]:["getFillColor"],[jl.layerName]:["getFillColor"],[OA.layerName]:["getColor"],[Ty.layerName]:["getColor"],[Yu.layerName]:["getColor"],[Pg.layerName]:["getColor"],[Zu.layerName]:["getFillColor"],[Rg.layerName]:["getFillColor","getColor","getLineColor"],[qu.layerName]:["getFillColor"],[dh.layerName]:["getColor"],[Ug.layerName]:["getColor"],[th.layerName]:["getColor"]},ZEe=({object:r,objectInfo:e,originalFillFunction:t})=>{const n=typeof t=="function"?t(r,e):t;if(Array.isArray(n))return[n[0]||0,n[1]||0,n[2]||0,n[3]||255];if(typeof n=="string"&&n.startsWith("@@=")){const i=f9.convert({originalColor:n}).originalColor(r);return[i[0]||0,i[1]||0,i[2]||0,i[3]||255]}return null},RO=({isSelected:r,object:e,objectInfo:t,opacity:n,originalFillFunction:i})=>{const o=ZEe({object:e,objectInfo:t,originalFillFunction:i});if(!o)return null;let s=0;return r?s=Math.max(typeof o[3]=="number"?o[3]:n,n):s=Math.min(typeof o[3]=="number"?o[3]:n,n),[o[0]||0,o[1]||0,o[2]||0,s]},QEe=({isSelected:r,object:e,objectInfo:t,originalFillFunction:n,selectedColor:i,selectedOpacity:o=255,unselectedColor:s,unselectedOpacity:c=Math.floor(255*.4)})=>r?RO({opacity:o,isSelected:!0,object:e,objectInfo:t,originalFillFunction:n})||i:RO({opacity:c,isSelected:!1,object:e,objectInfo:t,originalFillFunction:n})||s,vg={selection:{indices:{},objects:{}}},FO=(r,e)=>{const t=e.match(/{(.*?)}/g);return t&&t.forEach(n=>{const i=n.substring(1,n.length-1);r.object.hasOwnProperty(i)?e=e.replace(n,r.object[i]):r.object.hasOwnProperty("properties")&&r.object.properties.hasOwnProperty(i)&&(e=e.replace(n,r.object.properties[i]))}),e};function eTe(r,e){return e.id?r.getElementState(e.id,"selection")??vg:vg}function tTe(r,e){if(!e.id)return vg;const t=r.getStringValue(e);return(t?Q1.parse(t):null)??vg}function rTe(r,e,t,n){r.id&&e.setStringValue(r,JSON.stringify(t.value),{fromUi:t.fromUi},n)}const nTe=r=>{var J;const{height:e,width:t,expanded:n}=zO(GO),{element:i,fragmentId:o,isLightTheme:s,theme:c,widgetMgr:f}=r,{selectionMode:_,tooltip:b,useContainerWidth:T}=i,S=n??!1,[D,k]=r5({element:i,getDefaultState:eTe,getStateFromWidgetMgr:tTe,updateWidgetMgrState:rTe,widgetMgr:f,fragmentId:o}),[G,W]=Bt.useState(null),{height:z,width:j}=ice({element:i,isFullScreen:S,shouldUseContainerWidth:T,container:{height:e,width:t},heightFallback:((J=G==null?void 0:G.initialViewState)==null?void 0:J.height)||c.sizes.defaultMapHeight}),[K,fe]=Bt.useState(null),Z=_[0],ae=Z!==void 0,Be=ae&&Object.keys(D.selection.indices).length>0,Ne=Bt.useMemo(()=>Object.freeze(Q1.parse(i.json)),[S,s,i.json]),de=Bt.useMemo(()=>{var Qe;const te={...Ne};if(te.mapStyle||(te.mapStyle=s?"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"),((te==null?void 0:te.mapProvider)=="carto"||(te==null?void 0:te.mapStyle)&&((Qe=te.mapStyle)==null?void 0:Qe.indexOf("cartocdn"))>=0)&&!te.cartoKey&&(te.cartoKey="x7g2plm9yq8vfrc"),te.layers){const Ee=Object.values(D.selection.indices).some(Ge=>Ge==null?void 0:Ge.length),De=te.layers.some(Ge=>Object.hasOwn(Ge,"pickable"));te.layers=te.layers.map(Ge=>{var mt,Tt;if(!Ge||Array.isArray(Ge)||!ae)return Ge;De||(Ge.pickable=!0);const et=`${Ge.id||null}`,it=((Tt=(mt=D==null?void 0:D.selection)==null?void 0:mt.indices)==null?void 0:Tt[et])||[],rt=qEe[Ge["@@type"]];if(!rt)return Ge;const ct={...Ge};return rt.forEach(tt=>{var hr;ct.updateTriggers={[tt]:[...((hr=ct.updateTriggers)==null?void 0:hr[tt])||[],it,Ee]};const lr=!Ee,Jt=Ge[tt];if(lr||!Jt)return ct;const Wt=255,Lt=Math.floor(255*.4),sr=lB(c.colors.primary),qr=[sr[0],sr[1],sr[2],Wt],Er=lB(c.colors.gray20),pr=[Er[0],Er[1],Er[2],Lt],Mn=(dr,Zr)=>QEe({isSelected:it.includes(Zr.index),object:dr,objectInfo:Zr,originalFillFunction:Jt,selectedColor:qr,unselectedColor:pr,selectedOpacity:Wt,unselectedOpacity:Lt});ct[tt]=Mn}),ct})}return te==null||delete te.views,f9.convert(te)},[D.selection.indices,s,ae,Ne,c.colors.gray20,c.colors.primary]);Bt.useEffect(()=>{if(!WU(de.initialViewState,K)){const te=Object.keys(de.initialViewState).reduce((be,Qe)=>de.initialViewState[Qe]===(K==null?void 0:K[Qe])?be:{...be,[Qe]:de.initialViewState[Qe]},{});W(be=>({...be,...te})),fe(de.initialViewState)}},[de.initialViewState,K,G]);const _e=Bt.useCallback(te=>{if(!te||!te.object||!b)return null;const be=Q1.parse(b);return be.html?be.html=FO(te,be.html):be.text=FO(te,be.text),be},[b]),pe=Bt.useCallback(({viewState:te})=>{W(te)},[W]);return{createTooltip:_e,data:D,deck:de,hasActiveSelection:Be,height:z,isSelectionModeActivated:ae,onViewStateChange:pe,selectionMode:Z,setSelection:k,viewState:G,width:j}},iTe=()=>Df(JU,{});Ig([Yw,Ax]);const q1=vg.selection,sTe=[],oTe=r=>{var J;const{disabled:e,disableFullscreenMode:t,element:n,fragmentId:i,widgetMgr:o}=r,{libConfig:s}=Bt.useContext(XU),c=KU(),{expanded:f,expand:_,collapse:b}=zO(GO),{createTooltip:T,data:S,deck:D,hasActiveSelection:k,height:G,isSelectionModeActivated:W,onViewStateChange:z,selectionMode:j,setSelection:K,viewState:fe,width:Z}=nTe({element:n,fragmentId:i,isLightTheme:UO(c),theme:c,widgetMgr:o}),ae=n.mapboxToken||s.mapboxToken,Be=D.mapProvider=="mapbox"||(D==null?void 0:D.mapStyle)&&((J=D.mapStyle)==null?void 0:J.indexOf("mapbox"))>=0,[Ne,de]=Bt.useState(!1);Bt.useEffect(()=>{de(!0)},[]);const _e=Bt.useCallback(te=>{var rt;if(j===void 0)return;const{index:be,object:Qe}=te,Ee=`${((rt=te.layer)==null?void 0:rt.id)||null}`,De=S,Ge=be===-1,it=(()=>{var ct;if(Ge)return q1;switch(j){case fB.SelectionMode.SINGLE_OBJECT:return((ct=De.selection.indices[Ee])==null?void 0:ct[0])===be?q1:{indices:{[`${Ee}`]:[be]},objects:{[`${Ee}`]:[Qe]}};case fB.SelectionMode.MULTI_OBJECT:{const mt=new Map((()=>{var tt,lr;return(((lr=(tt=De==null?void 0:De.selection)==null?void 0:tt.indices)==null?void 0:lr[Ee])||[]).map((Jt,Wt)=>{var Lt,sr,qr;return[Jt,(qr=(sr=(Lt=De.selection)==null?void 0:Lt.objects)==null?void 0:sr[Ee])==null?void 0:qr[Wt]]})})());if(mt.has(be)?mt.delete(be):mt.set(be,Qe),mt.size===0){const{[Ee]:Tt,...tt}=De.selection.indices,{[Ee]:lr,...Jt}=De.selection.objects;return{indices:tt,objects:Jt}}return{indices:{...De.selection.indices,[`${Ee}`]:Array.from(mt.keys())},objects:{...De.selection.objects,[`${Ee}`]:Array.from(mt.values())}}}default:throw YU(j),new Error("Invalid selection mode")}})();JSON.stringify(it)!==JSON.stringify(De.selection)&&K({fromUi:!0,value:{selection:it}})},[j,S,K]),pe=Bt.useCallback(()=>{K({value:{selection:q1},fromUi:!0})},[K]);return uB(bM,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",height:G,children:[Be?Df(iTe,{}):null,Df(e5,{isFullScreen:f,disableFullscreenMode:t,onExpand:_,onCollapse:b,target:bM,locked:k&&!e?!0:void 0,children:k&&!e&&Df(QU,{label:"Clear selection",onClick:pe,icon:ZU})}),fe&&uB(gZ,{viewState:fe,onViewStateChange:z,height:G,width:Z,layers:Ne?D.layers:sTe,getTooltip:T,ContextProvider:uh.Provider,controller:!0,onClick:W&&!e?_e:void 0,children:[Df(Hl,{height:G,width:Z,mapStyle:D.mapStyle&&(typeof D.mapStyle=="string"?D.mapStyle:D.mapStyle[0]),mapboxApiAccessToken:ae}),Df(nce,{children:Df(Mte,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})},aTe=t5(oTe),hBe=Bt.memo(aTe);export{hBe as default};
5366
+ `;break;case"r":Ut+="\r";break;case"t":Ut+=" ";break;case"b":Ut+="\b";break;case"f":Ut+="\f";break;case"v":Ut+="\v";break;default:Ut+=Qr}else Ut+=Qr;return Tr||de('Unclosed quote after "'+Ut+'"',tt),{type:s,value:Ut,raw:Ar+Ut+Ar}},Sr=function(){var Ut=Lt(tt),Ar=tt,Tr;for(rt(Ut)?tt++:de("Unexpected "+Wt(tt),tt);tt<sr&&(Ut=Lt(tt),ct(Ut));)tt++;return Tr=Tt.slice(Ar,tt),Ee.hasOwnProperty(Tr)?{type:s,value:Ee[Tr],raw:Tr}:Tr===De?{type:c}:{type:i,name:Tr}},ei=function(Ut){for(var Ar,Tr=[],Qr,ui=!1,Pe=0;tt<sr;)if(qr(),Ar=Lt(tt),Ar===Ut){ui=!0,tt++,Ut===K&&Pe&&Pe>=Tr.length&&de("Unexpected token "+String.fromCharCode(Ut),tt);break}else if(Ar===G){if(tt++,Pe++,Pe!==Tr.length){if(Ut===K)de("Unexpected token ,",tt);else if(Ut===Z)for(var Dt=Tr.length;Dt<Pe;Dt++)Tr.push(null)}}else Qr=Er(),(!Qr||Qr.type===n)&&de("Expected comma",tt),Tr.push(Qr);return ui||de("Expected "+String.fromCharCode(Ut),tt),Tr},$n=function(){var Ut,Ar;for(Ut=Lt(tt),Ut===j?Ar=un():Ar=Sr(),qr(),Ut=Lt(tt);Ut===k||Ut===fe||Ut===j;)tt++,Ut===k?(qr(),Ar={type:o,computed:!1,object:Ar,property:Sr()}):Ut===fe?(Ar={type:o,computed:!0,object:Ar,property:Er()},qr(),Ut=Lt(tt),Ut!==Z&&de("Unclosed [",tt),tt++):Ut===j&&(Ar={type:f,arguments:ei(K),callee:Ar}),qr(),Ut=Lt(tt);return Ar},un=function(){tt++;var Ut=Er();if(qr(),Lt(tt)===K)return tt++,Ut;de("Unclosed (",tt)},Xn=function(){return tt++,{type:D,elements:ei(Z)}},kn=[],bn,Wn;tt<sr;)bn=Lt(tt),bn===Be||bn===G?tt++:(Wn=Er())?kn.push(Wn):tt<sr&&de('Unexpected "'+Wt(tt)+'"',tt);return kn.length===1?kn[0]:{type:n,body:kn}};mt.version="0.3.5",mt.toString=function(){return"JavaScript Expression Parser (JSEP) v"+mt.version},mt.addUnaryOp=function(Tt){return be=Math.max(Tt.length,be),pe[Tt]=_e,this},mt.addBinaryOp=function(Tt,tt){return Qe=Math.max(Tt.length,Qe),J[Tt]=tt,this},mt.addLiteral=function(Tt,tt){return Ee[Tt]=tt,this},mt.removeUnaryOp=function(Tt){return delete pe[Tt],Tt.length===be&&(be=te(pe)),this},mt.removeAllUnaryOps=function(){return pe={},be=0,this},mt.removeBinaryOp=function(Tt){return delete J[Tt],Tt.length===Qe&&(Qe=te(J)),this},mt.removeAllBinaryOps=function(){return J={},Qe=0,this},mt.removeLiteral=function(Tt){return delete Ee[Tt],this},mt.removeAllLiterals=function(){return Ee={},this},r.exports?e=r.exports=mt:e.parse=mt})()}(bm,bm.exports)),bm.exports}var FEe=REe();const OEe=ih(FEe),BO={"||":(r,e)=>r||e,"&&":(r,e)=>r&&e,"|":(r,e)=>r|e,"^":(r,e)=>r^e,"&":(r,e)=>r&e,"==":(r,e)=>r==e,"!=":(r,e)=>r!=e,"===":(r,e)=>r===e,"!==":(r,e)=>r!==e,"<":(r,e)=>r<e,">":(r,e)=>r>e,"<=":(r,e)=>r<=e,">=":(r,e)=>r>=e,"<<":(r,e)=>r<<e,">>":(r,e)=>r>>e,">>>":(r,e)=>r>>>e,"+":(r,e)=>r+e,"-":(r,e)=>r-e,"*":(r,e)=>r*e,"/":(r,e)=>r/e,"%":(r,e)=>r%e},DEe={"-":r=>-r,"+":r=>+r,"~":r=>~r,"!":r=>!r};function SO(r,e){return r.map(function(t){return Vs(t,e)})}function IO(r,e){const t=Vs(r.object,e);let n;if(r.computed?n=Vs(r.property,e):n=r.property.name,/^__proto__|prototype|constructor$/.test(n))throw Error(`Access to member "${n}" disallowed.`);return[t,t[n]]}function Vs(r,e){const t=r;switch(t.type){case"ArrayExpression":return SO(t.elements,e);case"BinaryExpression":return BO[t.operator](Vs(t.left,e),Vs(t.right,e));case"CallExpression":let n,i,o;return t.callee.type==="MemberExpression"?(o=IO(t.callee,e),n=o[0],i=o[1]):i=Vs(t.callee,e),typeof i!="function"?void 0:i.apply(n,SO(t.arguments,e));case"ConditionalExpression":return Vs(t.test,e)?Vs(t.consequent,e):Vs(t.alternate,e);case"Identifier":return e[t.name];case"Literal":return t.value;case"LogicalExpression":return t.operator==="||"?Vs(t.left,e)||Vs(t.right,e):t.operator==="&&"?Vs(t.left,e)&&Vs(t.right,e):BO[t.operator](Vs(t.left,e),Vs(t.right,e));case"MemberExpression":return IO(t,e)[1];case"ThisExpression":return e;case"UnaryExpression":return DEe[t.operator](Vs(t.argument,e));default:return}}const Y1={"-":r=>r};function c9(r,e){if(r in Y1)return Y1[r];let t;const n=OEe(r);return n.type==="Identifier"?t=i=>IEe(i,r):(Kx(n,i=>{if(i.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),t=i=>Vs(n,i)),Y1[r]=t,t}function Kx(r,e){if(Array.isArray(r))r.forEach(t=>Kx(t,e));else if(r&&typeof r=="object"){r.type&&e(r);for(const t in r)Kx(r[t],e)}}const V_="@@=",MO="@@#",LEe="@@type",l9="@@function",PO=r=>r&&typeof r=="object";class Yx{constructor(...e){this.typeKey=LEe,this.functionKey=l9,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=c9,this.preProcessClassProps=(t,n)=>n,this.postProcessConvertedJson=t=>t;for(const t of e)this.merge(t)}merge(e){for(const t in e)switch(t){case"layers":case"views":Object.assign(this.classes,e[t]);break;default:if(t in this){const n=e[t];this[t]=PO(this[t])?Object.assign(this[t],n):n}}}validate(e){return Xx(!this.typeKey||typeof this.typeKey=="string"),Xx(PO(this.classes)),!0}}function NEe(r){return typeof r=="string"&&r.startsWith(V_)}function kEe(r){return r.replace(V_,"")}function u9(r,e){const t={};for(const n in r){let i=r[n];NEe(i)&&(i=kEe(i),i=c9(i)),t[n]=i}return t}function UEe(r,e,t){const n=t.classes[r],i=t.reactComponents[r];if(!n&&!i){const{log:o}=t;if(o){const s=JSON.stringify(e,null,0).slice(0,40);o.warn(`JSON converter: No registered class of type ${r}(${s}...) `)}return null}return n?zEe(n,e,t):GEe(i,e,t)}function zEe(r,e,t){return t.preProcessClassProps&&(e=t.preProcessClassProps(r,e,t)),e=u9(e),new r(e)}function GEe(r,e,t){const{React:n}=t,{children:i=[]}=e;return delete e.children,t.preProcessClassProps&&(e=t.preProcessClassProps(r,e,t)),e=u9(e),n.createElement(r,e,i)}function VEe(r,e,t){const n=t.functions[r];if(!n){const{log:i}=t;if(i){const o=JSON.stringify(e,null,0).slice(0,40);i.warn(`JSON converter: No registered function ${r}(${o}...) `)}return null}return n(e)}function HEe(r){return typeof r=="string"?JSON.parse(r):r}const zE=r=>r&&typeof r=="object";class jEe{constructor(e){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(e)}finalize(){}setProps(e){"configuration"in e&&(this.configuration=e.configuration instanceof Yx?e.configuration:new Yx(e.configuration)),"onJSONChange"in e&&(this.onJSONChange=e.onJSONChange)}mergeConfiguration(e){this.configuration.merge(e)}convert(e){if(!e||e===this.json)return this.convertedJson;this.json=e;const t=HEe(e);let n=$Ee(t,this.configuration);return n=this.configuration.postProcessConvertedJson(n),this.convertedJson=n,n}convertJson(e){return this.convert(e)}}function $Ee(r,e){return e=new Yx(e),GE(r,"",e)}function GE(r,e,t){return Array.isArray(r)?r.map((n,i)=>GE(n,String(i),t)):WEe(r,t)?JEe(r,t):zE(r)?l9 in r?XEe(r,t):VE(r,t):typeof r=="string"?KEe(r,e,t):r}function WEe(r,e){const{typeKey:t}=e;return zE(r)&&!!r[t]}function JEe(r,e){const{typeKey:t}=e,n=r[t];let i={...r};return delete i[t],i=VE(i,e),UEe(n,i,e)}function XEe(r,e){const{functionKey:t}=e,n=r[t];let i={...r};return delete i[t],i=VE(i,e),VEe(n,i,e)}function VE(r,e){Xx(zE(r));const t={};for(const n in r){const i=r[n];t[n]=GE(i,n,e)}return t}function KEe(r,e,t){if(r.startsWith(V_)&&t.convertFunction)return r=r.replace(V_,""),t.convertFunction(r,t);if(r.startsWith(MO)){if(r=r.replace(MO,""),t.constants[r])return t.constants[r];const[n,i]=r.split(".");return t.enumerations[n][i]}return r}const YEe={classes:{..._ue,...BEe,...d2e,...ame,...SEe},functions:{colorBins:Zwe,colorCategories:Qwe,colorContinuous:eCe}},f9=new jEe({configuration:YEe}),qEe={[Xy.layerName]:["getFillColor"],[Ny.layerName]:["getFillColor"],[sl.layerName]:["getFillColor"],[DA.layerName]:["getFillColor"],[Py.layerName]:["getFillColor"],[My.layerName]:["getFillColor"],[Oy.layerName]:["getColor"],[Mg.layerName]:["getTargetColor","getSourceColor"],[il.layerName]:["getFillColor"],[jl.layerName]:["getFillColor"],[OA.layerName]:["getColor"],[Ty.layerName]:["getColor"],[Yu.layerName]:["getColor"],[Pg.layerName]:["getColor"],[Zu.layerName]:["getFillColor"],[Rg.layerName]:["getFillColor","getColor","getLineColor"],[qu.layerName]:["getFillColor"],[dh.layerName]:["getColor"],[Ug.layerName]:["getColor"],[th.layerName]:["getColor"]},ZEe=({object:r,objectInfo:e,originalFillFunction:t})=>{const n=typeof t=="function"?t(r,e):t;if(Array.isArray(n))return[n[0]||0,n[1]||0,n[2]||0,n[3]||255];if(typeof n=="string"&&n.startsWith("@@=")){const i=f9.convert({originalColor:n}).originalColor(r);return[i[0]||0,i[1]||0,i[2]||0,i[3]||255]}return null},RO=({isSelected:r,object:e,objectInfo:t,opacity:n,originalFillFunction:i})=>{const o=ZEe({object:e,objectInfo:t,originalFillFunction:i});if(!o)return null;let s=0;return r?s=Math.max(typeof o[3]=="number"?o[3]:n,n):s=Math.min(typeof o[3]=="number"?o[3]:n,n),[o[0]||0,o[1]||0,o[2]||0,s]},QEe=({isSelected:r,object:e,objectInfo:t,originalFillFunction:n,selectedColor:i,selectedOpacity:o=255,unselectedColor:s,unselectedOpacity:c=Math.floor(255*.4)})=>r?RO({opacity:o,isSelected:!0,object:e,objectInfo:t,originalFillFunction:n})||i:RO({opacity:c,isSelected:!1,object:e,objectInfo:t,originalFillFunction:n})||s,vg={selection:{indices:{},objects:{}}},FO=(r,e)=>{const t=e.match(/{(.*?)}/g);return t&&t.forEach(n=>{const i=n.substring(1,n.length-1);Object.hasOwn(r.object,i)?e=e.replace(n,r.object[i]):Object.hasOwn(r.object,"properties")&&Object.hasOwn(r.object.properties,i)&&(e=e.replace(n,r.object.properties[i]))}),e};function eTe(r,e){return e.id?r.getElementState(e.id,"selection")??vg:vg}function tTe(r,e){if(!e.id)return vg;const t=r.getStringValue(e);return(t?Q1.parse(t):null)??vg}function rTe(r,e,t,n){r.id&&e.setStringValue(r,JSON.stringify(t.value),{fromUi:t.fromUi},n)}const nTe=r=>{var J;const{height:e,width:t,expanded:n}=zO(GO),{element:i,fragmentId:o,isLightTheme:s,theme:c,widgetMgr:f}=r,{selectionMode:_,tooltip:b,useContainerWidth:T}=i,S=n??!1,[D,k]=r5({element:i,getDefaultState:eTe,getStateFromWidgetMgr:tTe,updateWidgetMgrState:rTe,widgetMgr:f,fragmentId:o}),[G,W]=Bt.useState(null),{height:z,width:j}=ice({element:i,isFullScreen:S,shouldUseContainerWidth:T,container:{height:e,width:t},heightFallback:((J=G==null?void 0:G.initialViewState)==null?void 0:J.height)||c.sizes.defaultMapHeight}),[K,fe]=Bt.useState(null),Z=_[0],ae=Z!==void 0,Be=ae&&Object.keys(D.selection.indices).length>0,Ne=Bt.useMemo(()=>Object.freeze(Q1.parse(i.json)),[S,s,i.json]),de=Bt.useMemo(()=>{var Qe;const te={...Ne};if(te.mapStyle||(te.mapStyle=s?"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json":"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"),((te==null?void 0:te.mapProvider)=="carto"||(te==null?void 0:te.mapStyle)&&((Qe=te.mapStyle)==null?void 0:Qe.indexOf("cartocdn"))>=0)&&!te.cartoKey&&(te.cartoKey="x7g2plm9yq8vfrc"),te.layers){const Ee=Object.values(D.selection.indices).some(Ge=>Ge==null?void 0:Ge.length),De=te.layers.some(Ge=>Object.hasOwn(Ge,"pickable"));te.layers=te.layers.map(Ge=>{var mt,Tt;if(!Ge||Array.isArray(Ge)||!ae)return Ge;De||(Ge.pickable=!0);const et=`${Ge.id||null}`,it=((Tt=(mt=D==null?void 0:D.selection)==null?void 0:mt.indices)==null?void 0:Tt[et])||[],rt=qEe[Ge["@@type"]];if(!rt)return Ge;const ct={...Ge};return rt.forEach(tt=>{var hr;ct.updateTriggers={[tt]:[...((hr=ct.updateTriggers)==null?void 0:hr[tt])||[],it,Ee]};const lr=!Ee,Jt=Ge[tt];if(lr||!Jt)return ct;const Wt=255,Lt=Math.floor(255*.4),sr=lB(c.colors.primary),qr=[sr[0],sr[1],sr[2],Wt],Er=lB(c.colors.gray20),pr=[Er[0],Er[1],Er[2],Lt],Mn=(dr,Zr)=>QEe({isSelected:it.includes(Zr.index),object:dr,objectInfo:Zr,originalFillFunction:Jt,selectedColor:qr,unselectedColor:pr,selectedOpacity:Wt,unselectedOpacity:Lt});ct[tt]=Mn}),ct})}return te==null||delete te.views,f9.convert(te)},[D.selection.indices,s,ae,Ne,c.colors.gray20,c.colors.primary]);Bt.useEffect(()=>{if(!WU(de.initialViewState,K)){const te=Object.keys(de.initialViewState).reduce((be,Qe)=>de.initialViewState[Qe]===(K==null?void 0:K[Qe])?be:{...be,[Qe]:de.initialViewState[Qe]},{});W(be=>({...be,...te})),fe(de.initialViewState)}},[de.initialViewState,K,G]);const _e=Bt.useCallback(te=>{if(!te||!te.object||!b)return null;const be=Q1.parse(b);return be.html?be.html=FO(te,be.html):be.text=FO(te,be.text),be},[b]),pe=Bt.useCallback(({viewState:te})=>{W(te)},[W]);return{createTooltip:_e,data:D,deck:de,hasActiveSelection:Be,height:z,isSelectionModeActivated:ae,onViewStateChange:pe,selectionMode:Z,setSelection:k,viewState:G,width:j}},iTe=()=>Df(JU,{});Ig([Yw,Ax]);const q1=vg.selection,sTe=[],oTe=r=>{var J;const{disabled:e,disableFullscreenMode:t,element:n,fragmentId:i,widgetMgr:o}=r,{libConfig:s}=Bt.useContext(XU),c=KU(),{expanded:f,expand:_,collapse:b}=zO(GO),{createTooltip:T,data:S,deck:D,hasActiveSelection:k,height:G,isSelectionModeActivated:W,onViewStateChange:z,selectionMode:j,setSelection:K,viewState:fe,width:Z}=nTe({element:n,fragmentId:i,isLightTheme:UO(c),theme:c,widgetMgr:o}),ae=n.mapboxToken||s.mapboxToken,Be=D.mapProvider=="mapbox"||(D==null?void 0:D.mapStyle)&&((J=D.mapStyle)==null?void 0:J.indexOf("mapbox"))>=0,[Ne,de]=Bt.useState(!1);Bt.useEffect(()=>{de(!0)},[]);const _e=Bt.useCallback(te=>{var rt;if(j===void 0)return;const{index:be,object:Qe}=te,Ee=`${((rt=te.layer)==null?void 0:rt.id)||null}`,De=S,Ge=be===-1,it=(()=>{var ct;if(Ge)return q1;switch(j){case fB.SelectionMode.SINGLE_OBJECT:return((ct=De.selection.indices[Ee])==null?void 0:ct[0])===be?q1:{indices:{[`${Ee}`]:[be]},objects:{[`${Ee}`]:[Qe]}};case fB.SelectionMode.MULTI_OBJECT:{const mt=new Map((()=>{var tt,lr;return(((lr=(tt=De==null?void 0:De.selection)==null?void 0:tt.indices)==null?void 0:lr[Ee])||[]).map((Jt,Wt)=>{var Lt,sr,qr;return[Jt,(qr=(sr=(Lt=De.selection)==null?void 0:Lt.objects)==null?void 0:sr[Ee])==null?void 0:qr[Wt]]})})());if(mt.has(be)?mt.delete(be):mt.set(be,Qe),mt.size===0){const{[Ee]:Tt,...tt}=De.selection.indices,{[Ee]:lr,...Jt}=De.selection.objects;return{indices:tt,objects:Jt}}return{indices:{...De.selection.indices,[`${Ee}`]:Array.from(mt.keys())},objects:{...De.selection.objects,[`${Ee}`]:Array.from(mt.values())}}}default:throw YU(j),new Error("Invalid selection mode")}})();JSON.stringify(it)!==JSON.stringify(De.selection)&&K({fromUi:!0,value:{selection:it}})},[j,S,K]),pe=Bt.useCallback(()=>{K({value:{selection:q1},fromUi:!0})},[K]);return uB(bM,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",height:G,children:[Be?Df(iTe,{}):null,Df(e5,{isFullScreen:f,disableFullscreenMode:t,onExpand:_,onCollapse:b,target:bM,locked:k&&!e?!0:void 0,children:k&&!e&&Df(QU,{label:"Clear selection",onClick:pe,icon:ZU})}),fe&&uB(gZ,{viewState:fe,onViewStateChange:z,height:G,width:Z,layers:Ne?D.layers:sTe,getTooltip:T,ContextProvider:uh.Provider,controller:!0,onClick:W&&!e?_e:void 0,children:[Df(Hl,{height:G,width:Z,mapStyle:D.mapStyle&&(typeof D.mapStyle=="string"?D.mapStyle:D.mapStyle[0]),mapboxApiAccessToken:ae}),Df(nce,{children:Df(Mte,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})},aTe=t5(oTe),hBe=Bt.memo(aTe);export{hBe as default};
@@ -1,3 +1,3 @@
1
- import{bs as _,bJ as ye,bt as $,r as u,z as $e,C as ne,j as R,bw as Re,bp as Oe,b5 as _e,bq as Se,aC as oe,H as ie,c3 as ae,bo as Pe}from"./index.C2qCX1Lh.js";import{a as we}from"./useBasicWidgetState.-99xbU_o.js";import"./FormClearHelper.D5PbW8FI.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(f),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});J.displayName="RadioMarkInner";J.displayName="RadioMarkInner";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});K.displayName="RadioMarkOuter";K.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bs as _,bJ as ye,bt as $,r as u,z as $e,C as ne,j as R,bw as Re,bp as Oe,b5 as _e,bq as Se,aC as oe,H as ie,c3 as ae,bo as Pe}from"./index.By-NmdnB.js";import{a as we}from"./useBasicWidgetState.Cedp0V76.js";import"./FormClearHelper.CVNTT-bJ.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function z(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(f),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});J.displayName="RadioMarkInner";J.displayName="RadioMarkInner";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});K.displayName="RadioMarkOuter";K.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t,n){return t&&De(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return ze(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=$(s.RadioGroupRoot,q),c=Ee(a,2),f=c[0],b=c[1];return u.createElement(f,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(p,l){if(!u.isValidElement(p))return null;var d=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Je(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Ke(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Je(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=$(i.Root,X),a=M(s,2),c=a[0],f=a[1],b=$(i.Label,Q),p=M(b,2),l=p[0],d=p[1],S=$(i.Input,Y),g=M(S,2),P=g[0],H=g[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,J),ee=M(m,2),de=ee[0],he=ee[1],be=$(i.RadioMarkOuter,K),te=M(be,2),ge=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},w,f),et(this.props.labelPlacement)&&re,u.createElement(ge,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[f,b]=u.useState(n??null);u.useEffect(()=>{n!==f&&b(n??null)},[n]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,g=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?"&nbsp;":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:p,value:f!==null?f.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:f,label:b,labelVisibility:p,help:l}=t;return R(it,{label:b,onChange:s,options:c,captions:f,disabled:e,horizontal:a,labelVisibility:Pe(p==null?void 0:p.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
@@ -1 +1 @@
1
- import{n as l,k as s,r,j as n}from"./index.C2qCX1Lh.js";import{P as i,R as m}from"./RenderInPortalIfExists.CjdyBvQX.js";const c=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,p=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,d=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,B=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,L=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,a=300,h=121,t=20,g=80,u=1e3,x=s("from{transform:translateY(calc(100vh + ",a,"px));}to{transform:translateY(0);}"),_=l("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:"-300px",marginLeft:`${-121/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-t)+t}vw`,animationDelay:`${Math.random()*u}ms`,height:`${a}px`,width:`${h}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,e=[c,p,f,d,B,L],A=e.length,I=({particleType:o})=>n(_,{src:e[o]}),M=({scriptRunId:o})=>n(m,{children:n(i,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=r.memo(M);export{w as NUM_BALLOONS,S as default};
1
+ import{n as l,k as s,r,j as n}from"./index.By-NmdnB.js";import{P as i,R as m}from"./RenderInPortalIfExists.CQLIsNPE.js";const c=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,p=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,d=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,B=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,L=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,a=300,h=121,t=20,g=80,u=1e3,x=s("from{transform:translateY(calc(100vh + ",a,"px));}to{transform:translateY(0);}"),_=l("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:"-300px",marginLeft:`${-121/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-t)+t}vw`,animationDelay:`${Math.random()*u}ms`,height:`${a}px`,width:`${h}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,e=[c,p,f,d,B,L],A=e.length,I=({particleType:o})=>n(_,{src:e[o]}),M=({scriptRunId:o})=>n(m,{children:n(i,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=r.memo(M);export{w as NUM_BALLOONS,S as default};
@@ -1 +1 @@
1
- import{n as p,r as s,z as T,C as x,j as i,D as w,aC as h,aQ as r,aR as v,aS as m,F as k,B as z}from"./index.C2qCX1Lh.js";const R=p("button",{target:"e1rpgzpk0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"e1rpgzpk1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),L=p("div",{target:"e1rpgzpk3"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function B(o){const a=z(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:a?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:a?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function E(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function D({body:o,icon:a}){const t=T(),n=E(o),d=o!==n,[e,y]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{y(!e)},[e]),c=s.useMemo(()=>B(t),[t]),l=s.useMemo(()=>x(C,{expanded:e,children:[a&&i(w,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),x(L,{children:[i(h,{source:e?o:n,allowHTML:!1,isToast:!0}),d&&i(R,{"data-testid":"stToastViewButton",onClick:f,children:e?"view less":"view more"})]})]}),[d,e,o,a,n,f]);s.useEffect(()=>{if(t.inSidebar)return;const g=r.info(l,{overrides:{...c}});return b(g),()=>{r.update(g,{overrides:{Body:{style:{display:"none"}}}}),r.clear(g)}},[]),s.useEffect(()=>{r.update(u,{children:l,overrides:{...c}})},[u,l,c]);const S=i(m,{kind:v.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return i(k,{children:t.inSidebar&&S})}const I=s.memo(D);export{I as default};
1
+ import{n as p,r as s,z as T,C as x,j as i,D as w,aC as h,aQ as r,aR as v,aS as m,F as k,B as z}from"./index.By-NmdnB.js";const R=p("button",{target:"e1rpgzpk0"})(({theme:o})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,color:o.colors.fadedText60,backgroundColor:o.colors.transparent,fontFamily:"inherit",margin:o.spacing.none,border:"none",boxShadow:"none",padding:o.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:o.colors.primary}})),C=p("div",{target:"e1rpgzpk1"})(({theme:o})=>({display:"flex",flexDirection:"row",gap:o.spacing.lg,"> span":{marginTop:o.spacing.twoXS}})),L=p("div",{target:"e1rpgzpk3"})(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,div:{display:"inline-flex"}}));function B(o){const a=z(o);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:o.spacing.md,width:o.sizes.toastWidth,marginTop:o.spacing.sm,borderTopLeftRadius:o.radii.default,borderTopRightRadius:o.radii.default,borderBottomLeftRadius:o.radii.default,borderBottomRightRadius:o.radii.default,paddingTop:o.spacing.lg,paddingBottom:o.spacing.lg,paddingLeft:o.spacing.twoXL,paddingRight:o.spacing.twoXL,backgroundColor:a?o.colors.gray10:o.colors.gray90,color:o.colors.bodyText,boxShadow:a?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:o.colors.fadedText40,width:o.fontSizes.lg,height:o.fontSizes.lg,marginRight:`calc(-1 * ${o.spacing.lg} / 2)`,":hover":{color:o.colors.bodyText}}}}}function E(o){if(o.length>104){let t=o.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return o}function D({body:o,icon:a}){const t=T(),n=E(o),d=o!==n,[e,y]=s.useState(!d),[u,b]=s.useState(0),f=s.useCallback(()=>{y(!e)},[e]),c=s.useMemo(()=>B(t),[t]),l=s.useMemo(()=>x(C,{expanded:e,children:[a&&i(w,{iconValue:a,size:"xl",testid:"stToastDynamicIcon"}),x(L,{children:[i(h,{source:e?o:n,allowHTML:!1,isToast:!0}),d&&i(R,{"data-testid":"stToastViewButton",onClick:f,children:e?"view less":"view more"})]})]}),[d,e,o,a,n,f]);s.useEffect(()=>{if(t.inSidebar)return;const g=r.info(l,{overrides:{...c}});return b(g),()=>{r.update(g,{overrides:{Body:{style:{display:"none"}}}}),r.clear(g)}},[]),s.useEffect(()=>{r.update(u,{children:l,overrides:{...c}})},[u,l,c]);const S=i(m,{kind:v.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`. See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return i(k,{children:t.inSidebar&&S})}const I=s.memo(D);export{I as default};